Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-1950

Table: check if correct when seqno wraps around

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • 3.6.5
    • 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());
      

              rhn-engineering-bban Bela Ban
              rhn-engineering-bban Bela Ban
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: