aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2021-03-15 16:58:10 +0100
committerAndrew Yourtchenko <ayourtch@gmail.com>2021-03-20 01:14:20 +0000
commit8d8150262b00435c365a43c8f859584901736aff (patch)
treec7eace6feab4895d6f40b16a54ef65cc63bebe67 /src
parent290526e3c72888ac05928ed0a6dddee02f7df650 (diff)
tests: add support for worker awareness
VppTestCase now has vpp_worker_count property set to number of workers. This can be overriden by child classes. Also overriden by VPP_WORKER_CONFIG variable for legacy reasons. Type: improvement Change-Id: Ic328bacb9003ddf9e92815767653bd362aa7f086 Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/nat/test/test_nat44_ed.py2
-rw-r--r--src/plugins/nat/test/test_nat44_ei.py2
-rw-r--r--src/plugins/quic/test/test_quic.py2
-rwxr-xr-xsrc/plugins/wireguard/test/test_wireguard.py2
-rw-r--r--src/vnet/policer/test/test_policer_input.py2
5 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/nat/test/test_nat44_ed.py b/src/plugins/nat/test/test_nat44_ed.py
index 5eb56a1301e..ba068b476c6 100644
--- a/src/plugins/nat/test/test_nat44_ed.py
+++ b/src/plugins/nat/test/test_nat44_ed.py
@@ -1957,7 +1957,7 @@ class TestNAT44ED(NAT44EDTestCase):
class TestNAT44EDMW(TestNAT44ED):
""" NAT44ED MW Test Case """
- worker_config = "workers 1"
+ vpp_worker_count = 1
def get_stats_counter(self, path, worker=1):
return super(TestNAT44EDMW, self).get_stats_counter(path, worker)
diff --git a/src/plugins/nat/test/test_nat44_ei.py b/src/plugins/nat/test/test_nat44_ei.py
index dcd7f46f073..f5c5abefa9e 100644
--- a/src/plugins/nat/test/test_nat44_ei.py
+++ b/src/plugins/nat/test/test_nat44_ei.py
@@ -3896,7 +3896,7 @@ class TestNAT44Out2InDPO(MethodHolder):
class TestNAT44EIMW(MethodHolder):
""" NAT44EI Test Cases (multiple workers) """
- worker_config = "workers %d" % 2
+ vpp_worker_count = 2
max_translations = 10240
max_users = 10240
diff --git a/src/plugins/quic/test/test_quic.py b/src/plugins/quic/test/test_quic.py
index d984b99610c..0e4cb2dacca 100644
--- a/src/plugins/quic/test/test_quic.py
+++ b/src/plugins/quic/test/test_quic.py
@@ -177,7 +177,7 @@ class QUICEchoExtTestCase(QUICTestCase):
post_test_sleep = 1
app = "vpp_echo"
evt_q_len = 16384
- worker_config = "workers 1"
+ vpp_worker_count = 1
server_fifo_size = "1M"
client_fifo_size = "4M"
extra_vpp_punt_config = ["session", "{",
diff --git a/src/plugins/wireguard/test/test_wireguard.py b/src/plugins/wireguard/test/test_wireguard.py
index 82ba2625498..edc305b1336 100755
--- a/src/plugins/wireguard/test/test_wireguard.py
+++ b/src/plugins/wireguard/test/test_wireguard.py
@@ -663,7 +663,7 @@ class TestWg(VppTestCase):
class WireguardHandoffTests(TestWg):
""" Wireguard Tests in multi worker setup """
- worker_config = "workers 2"
+ vpp_worker_count = 2
def test_wg_peer_init(self):
""" Handoff """
diff --git a/src/vnet/policer/test/test_policer_input.py b/src/vnet/policer/test/test_policer_input.py
index 29ae58ad5de..c95f6643ff2 100644
--- a/src/vnet/policer/test/test_policer_input.py
+++ b/src/vnet/policer/test/test_policer_input.py
@@ -15,7 +15,7 @@ NUM_PKTS = 67
class TestPolicerInput(VppTestCase):
""" Policer on an input interface """
- worker_config = "workers 2"
+ vpp_worker_count = 2
def setUp(self):
super(TestPolicerInput, self).setUp()