Browse files

added test which create NRW at seqno > 1

  • Loading branch information...
1 parent 6817f56 commit 4dc2b78fe1ec128205aa56b58c5348d3731a772c @belaban committed Dec 8, 2010
Showing with 26 additions and 0 deletions.
  1. +26 −0 tests/junit-functional/org/jgroups/tests/NakReceiverWindowTest.java
View
26 tests/junit-functional/org/jgroups/tests/NakReceiverWindowTest.java
@@ -684,6 +684,32 @@ public void testRemoveMany(TimeScheduler timer) {
}
}
+ @Test(dataProvider="createTimer")
+ public void testRemoveMany2(TimeScheduler timer) {
+ try {
+ NakReceiverWindow win=new NakReceiverWindow(sender, cmd, 4, timer);
+ win.add(5, msg());
+ win.add(6, msg());
+ win.add(7, msg());
+ win.add(9, msg());
+ win.add(10, msg());
+ System.out.println("win = " + win);
+ List<Message> msgs=win.removeMany(null);
+ System.out.println("msgs = " + msgs);
+ assert msgs.size() == 3;
+
+ win.add(8, msg());
+ msgs=win.removeMany(null);
+ System.out.println("msgs = " + msgs);
+ assert msgs.size() == 3;
+ }
+ finally {
+ timer.stop();
+ }
+ }
+
+
+
@Test(dataProvider="createTimer")
public void testRetransmitter(TimeScheduler timer) {

0 comments on commit 4dc2b78

Please sign in to comment.