Permalink
Browse files

added test for move()

  • Loading branch information...
1 parent c1b3018 commit ca54cd99ff55dc5a27d7e4cdd4ff4ff0eb4a7823 @belaban committed Dec 16, 2010
Showing with 12 additions and 0 deletions.
  1. +12 −0 tests/junit-functional/org/jgroups/tests/RetransmitTableTest.java
View
12 tests/junit-functional/org/jgroups/tests/RetransmitTableTest.java
@@ -190,6 +190,18 @@ public void testResizeWithPurge2() {
}
+ public static void testMove() {
+ RetransmitTable table=new RetransmitTable(3, 10, 0);
+ for(long i=0; i < 50; i++)
+ addAndGet(table, i, "hello-" + i);
+ table.purge(49);
+ assert table.isEmpty();
+ addAndGet(table, 50, "50");
+ assert table.size() == 1;
+ assert table.capacity() == 50;
+ }
+
+
public static void testPurge() {
RetransmitTable table=new RetransmitTable(5, 10, 0);
for(long seqno=0; seqno < 25; seqno++)

0 comments on commit ca54cd9

Please sign in to comment.