Skip to content

Commit 6b889c1

Browse files
committed
tweak: additional and more thourough tests
1 parent 891169f commit 6b889c1

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/com/danga/MemCached/test/MemCachedTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public static void main(String[] args) {
9393
i++;
9494
} else {
9595
try {
96-
Thread.currentThread().sleep(1000);
96+
Thread.sleep(1000);
9797
}
9898
catch (InterruptedException e) {
9999
e.printStackTrace();

src/com/danga/MemCached/test/UnitTests.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,13 @@ public static void test13() {
126126
}
127127

128128
public static void test14() {
129-
assert !mc.keyExists( "bar" );
130-
assert mc.keyExists( "foo" );
129+
assert !mc.keyExists( "foobar123" );
130+
mc.set( "foobar123", new Integer( 100000) );
131+
assert mc.keyExists( "foobar123" );
132+
133+
assert !mc.keyExists( "counterTest123" );
134+
mc.storeCounter( "counterTest123", 0 );
135+
assert mc.keyExists( "counterTest123" );
131136
}
132137

133138
/**

0 commit comments

Comments
 (0)