From 086ad4cf47d92654f8db82bada91d2d7cd744f1c Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Mon, 3 Dec 2012 09:54:59 +0100
Subject: [PATCH] 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: Iustin Pop <iustin@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>
---
 htest/Test/Ganeti/OpCodes.hs    | 2 +-
 htest/Test/Ganeti/TestCommon.hs | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/htest/Test/Ganeti/OpCodes.hs b/htest/Test/Ganeti/OpCodes.hs
index b2f6a7406..11ab09fa8 100644
--- a/htest/Test/Ganeti/OpCodes.hs
+++ b/htest/Test/Ganeti/OpCodes.hs
@@ -438,7 +438,7 @@ case_AllDefined = do
 -- be skipped).
 case_py_compat :: HUnit.Assertion
 case_py_compat = do
-  let num_opcodes = length OpCodes.allOpIDs * 500
+  let num_opcodes = length OpCodes.allOpIDs * 100
   sample_opcodes <- sample' (vectorOf num_opcodes
                              (arbitrary::Gen OpCodes.OpCode))
   let opcodes = head sample_opcodes
diff --git a/htest/Test/Ganeti/TestCommon.hs b/htest/Test/Ganeti/TestCommon.hs
index 00743c855..22f07e8c1 100644
--- a/htest/Test/Ganeti/TestCommon.hs
+++ b/htest/Test/Ganeti/TestCommon.hs
@@ -134,7 +134,7 @@ instance Show DNSChar where
 -- | Generates a single name component.
 genName :: Gen String
 genName = do
-  n <- choose (1, 64)
+  n <- choose (1, 16)
   dn <- vector n
   return (map dnsGetChar dn)
 
-- 
GitLab