mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-02 22:03:01 +02:00
test: Run negative ping tests in parallel
Rather than having to wait for each timeout sequentially, run each test in parallel.
This commit is contained in:
@@ -90,7 +90,7 @@ with infamy.Test() as test:
|
||||
ns1.addip("10.0.0.10")
|
||||
ns1.addroute("default", "10.0.0.1")
|
||||
|
||||
ns0.must_not_reach("10.0.0.10")
|
||||
ns1.must_not_reach("192.168.0.10")
|
||||
infamy.parallel(lambda: ns0.must_not_reach("10.0.0.10"),
|
||||
lambda: ns1.must_not_reach("192.168.0.10"))
|
||||
|
||||
test.succeed()
|
||||
|
||||
@@ -237,8 +237,8 @@ with infamy.Test() as test:
|
||||
ns0.addip("192.168.10.2")
|
||||
ns0.addroute("192.168.200.1/32", "192.168.10.1")
|
||||
|
||||
ns0.must_not_reach("192.168.200.1")
|
||||
ns0.must_not_reach("2001:db8:3c4d:200::1")
|
||||
infamy.parallel(lambda: ns0.must_not_reach("192.168.200.1"),
|
||||
lambda: ns0.must_not_reach("2001:db8:3c4d:200::1"))
|
||||
|
||||
|
||||
test.succeed()
|
||||
|
||||
@@ -154,9 +154,9 @@ with infamy.Test() as test:
|
||||
ns10.must_reach("10.0.0.3")
|
||||
ns11.must_reach("10.0.0.4")
|
||||
|
||||
ns10.must_not_reach("10.0.0.4")
|
||||
ns11.must_not_reach("10.0.0.3")
|
||||
ns10.must_not_reach("10.0.0.2")
|
||||
ns11.must_not_reach("10.0.0.1")
|
||||
infamy.parallel(lambda: ns10.must_not_reach("10.0.0.4"),
|
||||
lambda: ns11.must_not_reach("10.0.0.3"),
|
||||
lambda: ns10.must_not_reach("10.0.0.2"),
|
||||
lambda: ns11.must_not_reach("10.0.0.1"))
|
||||
|
||||
test.succeed()
|
||||
|
||||
Reference in New Issue
Block a user