NO-JIRA Fixing intermittent test failures

This commit is contained in:
Clebert Suconic 2024-06-03 14:31:13 -04:00
parent 180e434b78
commit aade3b35f6
1 changed files with 8 additions and 13 deletions

View File

@ -67,7 +67,6 @@ import org.apache.activemq.artemis.core.config.Configuration;
import org.apache.activemq.artemis.core.config.DivertConfiguration;
import org.apache.activemq.artemis.core.config.StoreConfiguration;
import org.apache.activemq.artemis.core.paging.PagingStore;
import org.apache.activemq.artemis.core.persistence.impl.journal.JournalStorageManager;
import org.apache.activemq.artemis.core.persistence.impl.journal.LargeServerMessageImpl;
import org.apache.activemq.artemis.core.server.ActiveMQServer;
import org.apache.activemq.artemis.core.server.LargeServerMessage;
@ -2609,7 +2608,7 @@ public class LargeMessageTest extends LargeMessageTestBase {
server.start();
LargeServerMessageImpl fileMessage = new LargeServerMessageImpl((JournalStorageManager) server.getStorageManager());
LargeServerMessageImpl fileMessage = new LargeServerMessageImpl(server.getStorageManager());
fileMessage.setMessageID(1005);
@ -2625,7 +2624,7 @@ public class LargeMessageTest extends LargeMessageTestBase {
// The server would be doing this
fileMessage.putLongProperty(Message.HDR_LARGE_BODY_SIZE, largeMessageSize);
fileMessage.releaseResources(false, false);
fileMessage.releaseResources(true, false);
assertEquals(largeMessageSize, fileMessage.getBodyBufferSize());
}
@ -2641,7 +2640,7 @@ public class LargeMessageTest extends LargeMessageTestBase {
ClientSession session = sf.createSession(false, false);
LargeServerMessageImpl fileMessage = new LargeServerMessageImpl((JournalStorageManager) server.getStorageManager());
LargeServerMessageImpl fileMessage = new LargeServerMessageImpl(server.getStorageManager());
fileMessage.setMessageID(1005);
@ -2652,7 +2651,7 @@ public class LargeMessageTest extends LargeMessageTestBase {
// The server would be doing this
fileMessage.putLongProperty(Message.HDR_LARGE_BODY_SIZE, largeMessageSize);
fileMessage.releaseResources(false, false);
fileMessage.releaseResources(true, false);
session.createQueue(new QueueConfiguration(ADDRESS));
@ -2701,14 +2700,10 @@ public class LargeMessageTest extends LargeMessageTestBase {
fileMessage.addBytes(new byte[]{ActiveMQTestBase.getSamplebyte(i)});
}
// we need to call sync, especially for JDBC Storage.
// we need to make sure the database has all the packets before a send can be called
fileMessage.getAppendFile().sync();
// The server would be doing this
fileMessage.putLongProperty(Message.HDR_LARGE_BODY_SIZE, largeMessageSize);
fileMessage.releaseResources(false, false);
fileMessage.releaseResources(true, false);
session.createQueue(new QueueConfiguration(ADDRESS));
@ -2730,7 +2725,7 @@ public class LargeMessageTest extends LargeMessageTestBase {
assertEquals(largeMessageSize, producer.getMessagesSentSize());
fileMessage = new LargeServerMessageImpl((JournalStorageManager) server.getStorageManager());
fileMessage = new LargeServerMessageImpl(server.getStorageManager());
fileMessage.setMessageID(1006);
@ -2884,7 +2879,7 @@ public class LargeMessageTest extends LargeMessageTestBase {
ClientSession session = sf.createSession(false, false);
LargeServerMessageImpl fileMessage = new LargeServerMessageImpl((JournalStorageManager) server.getStorageManager());
LargeServerMessageImpl fileMessage = new LargeServerMessageImpl(server.getStorageManager());
fileMessage.setMessageID(1005);
@ -2892,7 +2887,7 @@ public class LargeMessageTest extends LargeMessageTestBase {
fileMessage.addBytes(new byte[]{ActiveMQTestBase.getSamplebyte(i)});
}
fileMessage.releaseResources(false, false);
fileMessage.releaseResources(true, false);
session.createQueue(new QueueConfiguration(ADDRESS));