From ad4de2284dc47a88c1c73cc7bc55a745fec9eb13 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Fri, 14 Oct 2016 23:38:30 +0200 Subject: 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 --- tests/setlist.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/setlist.t') diff --git a/tests/setlist.t b/tests/setlist.t index 5e69fb3..7d14ec8 100644 --- a/tests/setlist.t +++ b/tests/setlist.t @@ -81,7 +81,7 @@ # Check listing 0 diff -u -I 'Size in memory.*' .foo setlist.t.list3 # List all sets -0 ipset list | grep -v Revision: > .foo +0 sleep .1s; ipset list | grep -v Revision: > .foo # Check listing 0 diff -u -I 'Size in memory.*' .foo setlist.t.list4 # Flush sets @@ -103,7 +103,7 @@ # Delete set from the set 0 ipset del test a # Check reference number of deleted set -0 ref=`ipset list a | grep References | sed 's/References: //'` && test $ref -eq 0 +0 ref=`sleep .1s; ipset list a | grep References | sed 's/References: //'` && test $ref -eq 0 # Add element to set a 0 ipset add a 1.1.1.1 # Swap sets -- cgit v1.2.3