NO-JIRA Fixing intermittent failure
This commit is contained in:
parent
0ce1487252
commit
c699b5ed1d
|
@ -51,7 +51,6 @@ import org.apache.activemq.artemis.core.config.BridgeConfiguration;
|
|||
import org.apache.activemq.artemis.core.config.Configuration;
|
||||
import org.apache.activemq.artemis.core.config.CoreQueueConfiguration;
|
||||
import org.apache.activemq.artemis.core.config.TransformerConfiguration;
|
||||
import org.apache.activemq.artemis.core.config.impl.ConfigurationImpl;
|
||||
import org.apache.activemq.artemis.core.io.SequentialFileFactory;
|
||||
import org.apache.activemq.artemis.core.io.nio.NIOSequentialFileFactory;
|
||||
import org.apache.activemq.artemis.core.journal.PreparedTransactionInfo;
|
||||
|
@ -98,14 +97,6 @@ public class BridgeTest extends ActiveMQTestBase {
|
|||
|
||||
private final boolean netty;
|
||||
|
||||
|
||||
@Override
|
||||
protected ConfigurationImpl createBasicConfig(final int serverID) {
|
||||
ConfigurationImpl config = super.createBasicConfig(serverID);
|
||||
config.setJournalDatasync(true).setJournalSyncNonTransactional(true).setJournalSyncTransactional(true);
|
||||
return config;
|
||||
}
|
||||
|
||||
@Parameterized.Parameters(name = "isNetty={0}")
|
||||
public static Collection getParameters() {
|
||||
return Arrays.asList(new Object[][]{{true}, {false}});
|
||||
|
|
|
@ -710,19 +710,19 @@ public class LVQTest extends ActiveMQTestBase {
|
|||
producer.send(m1);
|
||||
LinkedListIterator<MessageReference> browserIterator = queue.browserIterator();
|
||||
// Wait for message delivered to queue
|
||||
Wait.assertTrue(() -> browserIterator.hasNext(), 10, 2);
|
||||
Wait.assertTrue(() -> browserIterator.hasNext(), 10_000, 2);
|
||||
long messageId = browserIterator.next().getMessage().getMessageID();
|
||||
browserIterator.close();
|
||||
|
||||
queue.deleteReference(messageId);
|
||||
// Wait for delete tx's afterCommit called
|
||||
Wait.assertEquals(0L, () -> queue.getDeliveringSize(), 10, 2);
|
||||
Wait.assertEquals(0L, () -> queue.getDeliveringSize(), 10_000, 2);
|
||||
assertEquals(queue.getPersistentSize(), 0);
|
||||
assertTrue(((LastValueQueue)queue).getLastValueKeys().isEmpty());
|
||||
|
||||
producer.send(m2);
|
||||
// Wait for message delivered to queue
|
||||
Wait.assertTrue(() -> queue.getPersistentSize() > 10 * 1024, 10, 2);
|
||||
Wait.assertTrue(() -> queue.getPersistentSize() > 10 * 1024, 10_000, 2);
|
||||
assertEquals(queue.getDeliveringSize(), 0);
|
||||
}
|
||||
|
||||
|
@ -735,16 +735,17 @@ public class LVQTest extends ActiveMQTestBase {
|
|||
|
||||
Queue queue = server.locateQueue(qName1);
|
||||
producer.send(m1);
|
||||
Wait.assertEquals(1, queue::getMessageCount);
|
||||
LinkedListIterator<MessageReference> browserIterator = queue.browserIterator();
|
||||
// Wait for message delivered to queue
|
||||
Wait.assertTrue(() -> browserIterator.hasNext(), 10, 2);
|
||||
Assert.assertTrue(browserIterator.hasNext());
|
||||
long messageId = browserIterator.next().getMessage().getMessageID();
|
||||
browserIterator.close();
|
||||
long oldSize = queue.getPersistentSize();
|
||||
|
||||
assertTrue(queue.changeReferencePriority(messageId, (byte) 1));
|
||||
// Wait for message delivered to queue
|
||||
Wait.assertEquals(oldSize, () -> queue.getPersistentSize(), 10, 2);
|
||||
Wait.assertEquals(oldSize, () -> queue.getPersistentSize(), 10_000, 2);
|
||||
assertEquals(queue.getDeliveringSize(), 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue