Permalink
Browse files

Slow down the add test a bit.

Solaris with dtrace enabled was rather consistently failing this.
Expiration times around 1 can get dropped due to memcached clock
resolution.
  • Loading branch information...
1 parent cc45c12 commit 890e3cd7c1f22a4c84d6effa8591d219229fbfdf @dustin dustin committed Mar 11, 2009
Showing with 4 additions and 4 deletions.
  1. +4 −4 t/expirations.t
View
8 t/expirations.t
@@ -52,13 +52,13 @@ print $sock "set boo 0 $expire 6\r\nbooval\r\n";
is(scalar <$sock>, "STORED\r\n", "stored boo");
mem_get_is($sock, "boo", undef, "now expired");
-print $sock "add add 0 1 6\r\naddval\r\n";
+print $sock "add add 0 2 6\r\naddval\r\n";
is(scalar <$sock>, "STORED\r\n", "stored add");
mem_get_is($sock, "add", "addval");
# second add fails
-print $sock "add add 0 1 7\r\naddval2\r\n";
+print $sock "add add 0 2 7\r\naddval2\r\n";
is(scalar <$sock>, "NOT_STORED\r\n", "add failure");
-sleep(1.3);
-print $sock "add add 0 1 7\r\naddval3\r\n";
+sleep(2.3);
+print $sock "add add 0 2 7\r\naddval3\r\n";
is(scalar <$sock>, "STORED\r\n", "stored add again");
mem_get_is($sock, "add", "addval3");

0 comments on commit 890e3cd

Please sign in to comment.