NO-JIRA small tweak on test

(cherry picked from commit 42529899d0)
This commit is contained in:
Clebert Suconic 2022-11-10 07:51:45 -05:00
parent 60c5b9871e
commit 902e912f0d
1 changed files with 6 additions and 0 deletions

View File

@ -108,8 +108,14 @@ public class LinkedListTest extends ActiveMQTestBase {
Assert.assertEquals(1, scans); Assert.assertEquals(1, scans);
list.addSorted(10); list.addSorted(10);
list.addSorted(20); list.addSorted(20);
list.addSorted(19);
list.addSorted(7); // this will need a scan as it's totally random list.addSorted(7); // this will need a scan as it's totally random
Assert.assertEquals(2, scans); Assert.assertEquals(2, scans);
list.addSorted(8);
Assert.assertEquals(2, scans);
Assert.assertEquals(1, (int)list.poll());
list.addSorted(9);
Assert.assertEquals(3, scans); // remove (poll) should clear the last added cache
printDebug(); printDebug();
validateOrder(null); validateOrder(null);