]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Use only one TCP worker for the per-thread Lua regression test
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 13 Jan 2021 08:37:13 +0000 (09:37 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 13 Jan 2021 08:37:13 +0000 (09:37 +0100)
Otherwise the distribution of queries to the backends is very hard
to predict since every thread uses its own counter. We used to start
only one worker thread at startup, and did not send enough queries
to get additional workers fired up.

regression-tests.dnsdist/test_Routing.py

index 8aabad85fa3c32d79b462a6f95700b976ac3023a..77c0c231d7b10091f8b79c77fa535cd56d997de9 100644 (file)
@@ -258,6 +258,9 @@ class TestRoutingLuaFFIPerThreadRoundRobinLB(DNSDistTest):
     _testServer2Port = 5351
     _config_params = ['_testServerPort', '_testServer2Port']
     _config_template = """
+    -- otherwise we start too many TCP workers, and as each thread
+    -- uses it own counter this makes the TCP queries distribution hard to predict
+    setMaxTCPClientThreads(1)
     setServerPolicyLuaFFIPerThread("luaffiroundrobin", [[
       local ffi = require("ffi")
       local C = ffi.C