-
Task
-
Resolution: Done
-
Major
-
None
-
None
Check if we get correct results when a seqno wraps around. Use range [Long.MAX_VALUE -5 .. Long.MAX_VALUE + 5] to test.
The program below shows that NakReceiverWindow doesn't add the range correctly. Check if Table handles this correctly.
long seqno=Long.MAX_VALUE-5; TimeScheduler timer=new TimeScheduler3(); Address sender=Util.createRandomAddress("A"); NakReceiverWindow win=new NakReceiverWindow(sender, new Retransmitter.RetransmitCommand() { @Override public void retransmit(long first_seqno, long last_seqno, Address sender) { } }, seqno, timer, true); for(int i=0; i < 20; i++) win.add(seqno++, new Message(null, "hello")); System.out.println("win = " + win); final AtomicBoolean processing=new AtomicBoolean(false); List<Message> msgs=win.removeMany(processing, true, 200); System.out.printf("removed %d msgs\n", msgs.size());
- links to