]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
tests: limit number of iterations for krprint.serialize_lua to please CI
authorPetr Špaček <petr.spacek@nic.cz>
Wed, 14 Oct 2020 16:05:23 +0000 (18:05 +0200)
committerTomas Krizek <tomas.krizek@nic.cz>
Mon, 26 Oct 2020 13:25:14 +0000 (14:25 +0100)
We were exceeding CI time limit while running config tests under
Valgrind so let's see if smaller number of tests will get us through CI.

daemon/lua/krprint.test.lua

index ddd39cb9c45de5f7e97d0b956322c0e27a84b3f9..89bb9f103053ff835739e1363871bf5ac1c221ad 100644 (file)
@@ -69,17 +69,17 @@ local function test_number()
        test_de_serialization_autodesc(-math.huge)
        test_de_serialization_autodesc(math.huge)
        test_de_serialization_autodesc(tonumber('nan'))
-       for _=1,100 do  -- integers
+       for _=1,20 do  -- integers
                test_de_serialization_autodesc(gen_number_int())
        end
-       for _=1,100 do  -- floats
+       for _=1,20 do  -- floats
                test_de_serialization_autodesc(gen_number_float())
        end
 end
 
 local function test_string()
        test_de_serialization('', 'empty string')
-       for _=1,100 do
+       for _=1,20 do
                local str = gen_string(1024*10)
                test_de_serialization(str, 'random string length ' .. #str)
        end
@@ -135,7 +135,7 @@ local function gen_test_tables_supported(level)
 end
 
 function test_table_supported()
-       for i=1,100 do
+       for i=1,20 do
                local t = gen_test_tables_supported()
                test_de_serialization(t, 'random table no. ' .. i)
        end
@@ -203,7 +203,7 @@ local function gen_test_tables_unsupported()
 end
 
 local function test_unsupported_table()
-       for i=1,100 do
+       for i=1,20 do
                local t = gen_test_tables_unsupported()
                test_unsupported(t, 'random unsupported table no. ' .. i)()
        end