This is an automated email from the ASF dual-hosted git repository.

clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/main by this push:
     new 34f8946c77 ARTEMIS-5173 Removing dodgy test
34f8946c77 is described below

commit 34f8946c77d21bf9bb575504a9ad0f56c484d6a1
Author: Clebert Suconic <[email protected]>
AuthorDate: Tue Dec 10 17:54:36 2024 -0500

    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.
---
 .../core/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<String> 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 {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to