public void testOldDuplicatePacketsDroppedUsingNegativeCounters() throws Exception { int[] sequenceNumbers = {-3, -1, -3, -2, -1, 0, 1, -1, 3, 2, 0, 2, 4}; transport.setExpectedCounter(-3); sendStreamOfCommands(sequenceNumbers, true, 8); }
public void testValidWrapAroundPackets() throws Exception { int[] sequenceNumbers = new int[10]; int value = Integer.MAX_VALUE - 3; transport.setExpectedCounter(value); for (int i = 0; i < 10; i++) { LOG.info("command: " + i + " = " + value); sequenceNumbers[i] = value++; } sendStreamOfCommands(sequenceNumbers, true); }