Skip to content
Snippets Groups Projects
Commit 086ad4cf authored by Iustin Pop's avatar Iustin Pop
Browse files

Reduce hostname length in tests and opcode py_compat count


This improves Issue 325 - new runtime and memory consumption is about
1/10 compared to before.

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 9f80119c
No related merge requests found
...@@ -438,7 +438,7 @@ case_AllDefined = do ...@@ -438,7 +438,7 @@ case_AllDefined = do
-- be skipped). -- be skipped).
case_py_compat :: HUnit.Assertion case_py_compat :: HUnit.Assertion
case_py_compat = do case_py_compat = do
let num_opcodes = length OpCodes.allOpIDs * 500 let num_opcodes = length OpCodes.allOpIDs * 100
sample_opcodes <- sample' (vectorOf num_opcodes sample_opcodes <- sample' (vectorOf num_opcodes
(arbitrary::Gen OpCodes.OpCode)) (arbitrary::Gen OpCodes.OpCode))
let opcodes = head sample_opcodes let opcodes = head sample_opcodes
......
...@@ -134,7 +134,7 @@ instance Show DNSChar where ...@@ -134,7 +134,7 @@ instance Show DNSChar where
-- | Generates a single name component. -- | Generates a single name component.
genName :: Gen String genName :: Gen String
genName = do genName = do
n <- choose (1, 64) n <- choose (1, 16)
dn <- vector n dn <- vector n
return (map dnsGetChar dn) return (map dnsGetChar dn)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment