This is an automated email from the ASF dual-hosted git repository. clebertsuconic pushed a commit to branch 2.27.x in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
commit 902e912f0de9013c46c7b37e38da5047abe4ab9a Author: Clebert Suconic <[email protected]> AuthorDate: Thu Nov 10 07:51:45 2022 -0500 NO-JIRA small tweak on test (cherry picked from commit 42529899d01df63c4aea5f562a2db8058a455a5e) --- .../org/apache/activemq/artemis/tests/unit/util/LinkedListTest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/LinkedListTest.java b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/LinkedListTest.java index f95e91fc2c..b39a9e75dc 100644 --- a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/LinkedListTest.java +++ b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/util/LinkedListTest.java @@ -108,8 +108,14 @@ public class LinkedListTest extends ActiveMQTestBase { Assert.assertEquals(1, scans); list.addSorted(10); list.addSorted(20); + list.addSorted(19); list.addSorted(7); // this will need a scan as it's totally random 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(); validateOrder(null);
