summaryrefslogtreecommitdiffstats
path: root/tests/hash:ip.t
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2016-10-14 23:38:30 +0200
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2016-10-14 23:38:30 +0200
commitad4de2284dc47a88c1c73cc7bc55a745fec9eb13 (patch)
treea5a9f6bf1ae5b19a19e99758b12d10e47df8cc56 /tests/hash:ip.t
parent5ad55ac803a8b4969fe5b0e7b526c2e1e890c226 (diff)
Correct tests to check the number of entries too
Give enough time for the entries to timeout before listing, so that we get the correct number of entries. Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Diffstat (limited to 'tests/hash:ip.t')
-rw-r--r--tests/hash:ip.t8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/hash:ip.t b/tests/hash:ip.t
index a3ab1e2..36b82f9 100644
--- a/tests/hash:ip.t
+++ b/tests/hash:ip.t
@@ -1,11 +1,11 @@
# IP: Create a set with timeout
-0 ipset -N test iphash --hashsize 128 timeout 5
+0 ipset -N test iphash --hashsize 128 timeout 4
# Range: Add zero valued element
1 ipset -A test 0.0.0.0
# Range: Test zero valued element
1 ipset -T test 0.0.0.0
# IP: Add first random value
-0 ipset -A test 2.0.0.1 timeout 5
+0 ipset -A test 2.0.0.1 timeout 4
# IP: Add second random value
0 ipset -A test 192.168.68.69 timeout 0
# IP: Test first random value
@@ -41,7 +41,7 @@
# IP: Delete test set
0 ipset -X test
# IP: Restore values so that rehashing is triggered
-0 sed 's/hashsize 128/hashsize 128 timeout 5/' iphash.t.restore | ipset -R
+0 sed 's/hashsize 128/hashsize 128 timeout 4/' iphash.t.restore | ipset -R
# IP: Check that the values are restored
0 test `ipset -S test| grep add| wc -l` -eq 129
# Sleep 5s so that elements can time out
@@ -73,7 +73,7 @@
# IP: Destroy sets
0 ipset -X
# Network: Create a set with timeout
-0 ipset -N test iphash --hashsize 128 --netmask 24 timeout 5
+0 ipset -N test iphash --hashsize 128 --netmask 24 timeout 4
# Network: Add zero valued element
1 ipset -A test 0.0.0.0
# Network: Test zero valued element