Skip to content

Commit

Permalink
Slow down the add test a bit.
Browse files Browse the repository at this point in the history
Solaris with dtrace enabled was rather consistently failing this.
Expiration times around 1 can get dropped due to memcached clock
resolution.
  • Loading branch information
dustin committed Mar 11, 2009
1 parent cc45c12 commit 890e3cd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions t/expirations.t
Expand Up @@ -52,13 +52,13 @@ print $sock "set boo 0 $expire 6\r\nbooval\r\n";
is(scalar <$sock>, "STORED\r\n", "stored boo"); is(scalar <$sock>, "STORED\r\n", "stored boo");
mem_get_is($sock, "boo", undef, "now expired"); 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"); is(scalar <$sock>, "STORED\r\n", "stored add");
mem_get_is($sock, "add", "addval"); mem_get_is($sock, "add", "addval");
# second add fails # 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"); is(scalar <$sock>, "NOT_STORED\r\n", "add failure");
sleep(1.3); sleep(2.3);
print $sock "add add 0 1 7\r\naddval3\r\n"; print $sock "add add 0 2 7\r\naddval3\r\n";
is(scalar <$sock>, "STORED\r\n", "stored add again"); is(scalar <$sock>, "STORED\r\n", "stored add again");
mem_get_is($sock, "add", "addval3"); mem_get_is($sock, "add", "addval3");

0 comments on commit 890e3cd

Please sign in to comment.