Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

new test for resize()

  • Loading branch information...
commit 767b88b5fe2ca64d61b0033bc6147659af46bc39 1 parent 2552b32
@belaban authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 tests/junit-functional/org/jgroups/tests/RetransmitTableTest.java
View
15 tests/junit-functional/org/jgroups/tests/RetransmitTableTest.java
@@ -163,6 +163,21 @@ public void testResizeWithPurgeAndGetOfNonExistingElement() {
}
+ public void testResizeWithPurge2() {
+ RetransmitTable table=new RetransmitTable(3, 10, 0);
+ for(long i=0; i < 50; i++)
+ addAndGet(table, i, "hello-" + i);
+ System.out.println("table = " + table);
+ assert table.size() == 50;
+ assert table.capacity() == 50;
+ assert table.getHighestPurged() == 0;
+ assert table.getHighest() == 49;
+
+ table.purge(43);
+ addAndGet(table, 52, "hello-52");
+ }
+
+
public static void testPurge() {
RetransmitTable table=new RetransmitTable(5, 10, 0);
for(long seqno=0; seqno < 25; seqno++)
Please sign in to comment.
Something went wrong with that request. Please try again.