From 34f8946c77d21bf9bb575504a9ad0f56c484d6a1 Mon Sep 17 00:00:00 2001 From: Clebert Suconic Date: Tue, 10 Dec 2024 17:54:36 -0500 Subject: [PATCH] ARTEMIS-5173 Removing dodgy test This test was validating the number of files and not any real usage scenario. It's flaky now and it's pointless to fix it. --- .../journal/impl/JournalImplTestUnit.java | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/tests/artemis-test-support/src/main/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestUnit.java b/tests/artemis-test-support/src/main/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestUnit.java index 6320fdb439..52f4a0f26d 100644 --- a/tests/artemis-test-support/src/main/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestUnit.java +++ b/tests/artemis-test-support/src/main/java/org/apache/activemq/artemis/tests/unit/core/journal/impl/JournalImplTestUnit.java @@ -23,7 +23,6 @@ import static org.junit.jupiter.api.Assertions.fail; import java.io.File; import java.nio.ByteBuffer; -import java.util.Arrays; import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; @@ -123,32 +122,6 @@ public abstract class JournalImplTestUnit extends JournalImplTestBase { stopJournal(); } - @Test - public void testFlushAppendsAndDeletes() throws Exception { - setup(10, 10 * 1024, true); - createJournal(); - startJournal(); - load(); - byte[] record = new byte[1000]; - for (int i = 0; i < record.length; i++) { - record[i] = (byte) 'a'; - } - // Appending records after restart should be valid (not throwing any - // exceptions) - for (int i = 0; i < 10_000; i++) { - journal.appendAddRecord(i, (byte) 1, new SimpleEncoding(2, (byte) 'a'), false); - journal.appendDeleteRecord(i, false); - } - stopJournal(); - - List files = fileFactory.listFiles(fileExtension); - - // I am allowing one extra as a possible race with pushOpenFiles. I have not seen it happening on my test - // but it wouldn't be a problem if it happened - int size = files.size(); - assertTrue(size <= 11, "Supposed to have up to 10 (or 11) files, but got " + size + ":" + Arrays.toString(files.toArray())); - } - @Test public void testParams() throws Exception { try {