ARTEMIS-4790: switch to timeout declarations with default units, tweak a few values

This commit is contained in:
Robbie Gemmell 2024-06-05 11:40:33 +01:00
parent de0f6ac8f5
commit 4ebb2cd41a
180 changed files with 1181 additions and 1268 deletions

View File

@ -50,7 +50,6 @@ import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.regex.Pattern;
import org.apache.activemq.artemis.json.JsonArray;
@ -147,13 +146,13 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void invalidCliDoesntThrowException() {
testCli("--silent", "create");
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void invalidPathDoesntThrowException() {
if (isWindows()) {
testCli("create", "zzzzz:/rawr", "--silent");
@ -163,7 +162,7 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSupportsLibaio() throws Exception {
Create x = new Create();
x.setInstance(new File("/tmp/foo"));
@ -171,7 +170,7 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSync() throws Exception {
int writes = 2;
int tries = 5;
@ -184,7 +183,7 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSimpleCreate() throws Exception {
//instance1: default using http
File instance1 = new File(temporaryFolder, "instance1");
@ -193,7 +192,7 @@ public class ArtemisTest extends CliTestBase {
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCreateDB() throws Exception {
File instance1 = new File(temporaryFolder, "instance1");
Artemis.internalExecute("create", instance1.getAbsolutePath(), "--silent", "--jdbc");
@ -201,7 +200,7 @@ public class ArtemisTest extends CliTestBase {
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSimpleCreateMapped() throws Throwable {
try {
//instance1: default using http
@ -214,7 +213,7 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testOpenwireSupportAdvisoryDisabledByDefault() throws Exception {
FileConfiguration configuration = createFileConfiguration("supportAdvisory",
"--force", "--silent", "--no-web", "--no-autotune");
@ -225,7 +224,7 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testOpenwireEnabledSupportAdvisory() throws Exception {
FileConfiguration configuration = createFileConfiguration("supportAdvisory",
"--force", "--silent", "--no-web", "--no-autotune",
@ -261,7 +260,7 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testWebConfig() throws Exception {
setupAuth();
Run.setEmbedded(true);
@ -339,7 +338,7 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSecurityManagerConfiguration() throws Exception {
setupAuth();
Run.setEmbedded(true);
@ -417,7 +416,7 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testStopManagementContext() throws Exception {
Run.setEmbedded(true);
File instance1 = new File(temporaryFolder, "instance_user");
@ -433,13 +432,13 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testUserCommandJAAS() throws Exception {
testUserCommand(false);
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testUserCommandBasic() throws Exception {
testUserCommand(true);
}
@ -609,25 +608,25 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testUserCommandViaManagementPlaintextJAAS() throws Exception {
internalTestUserCommandViaManagement(true, false);
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testUserCommandViaManagementHashedJAAS() throws Exception {
internalTestUserCommandViaManagement(false, false);
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testUserCommandViaManagementPlaintextBasic() throws Exception {
internalTestUserCommandViaManagement(true, true);
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testUserCommandViaManagementHashedBasic() throws Exception {
internalTestUserCommandViaManagement(false, true);
}
@ -734,7 +733,7 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testListUserWithMultipleRolesWithSpaces() throws Exception {
try {
Run.setEmbedded(true);
@ -775,13 +774,13 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testProperReloadWhenAddingUserViaManagementJAAS() throws Exception {
testProperReloadWhenAddingUserViaManagement(false);
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testProperReloadWhenAddingUserViaManagementBasic() throws Exception {
testProperReloadWhenAddingUserViaManagement(true);
}
@ -826,7 +825,7 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMissingUserFileViaManagement() throws Exception {
Run.setEmbedded(true);
File instance1 = new File(temporaryFolder, "instance_user");
@ -850,7 +849,7 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMissingRoleFileViaManagement() throws Exception {
Run.setEmbedded(true);
File instance1 = new File(temporaryFolder, "instance_user");
@ -874,13 +873,13 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testUserCommandResetJAAS() throws Exception {
testUserCommandReset(false);
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testUserCommandResetBasic() throws Exception {
testUserCommandReset(true);
}
@ -1007,13 +1006,13 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testConcurrentUserAdministrationJAAS() throws Exception {
testConcurrentUserAdministration(false);
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testConcurrentUserAdministrationBasic() throws Exception {
testConcurrentUserAdministration(true);
}
@ -1121,7 +1120,7 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testRoleWithSpaces() throws Exception {
String roleWithSpaces = "amq with spaces";
Run.setEmbedded(true);
@ -1152,13 +1151,13 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testUserCommandResetViaManagementPlaintext() throws Exception {
internalTestUserCommandResetViaManagement(true);
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testUserCommandResetViaManagementHashed() throws Exception {
internalTestUserCommandResetViaManagement(false);
}
@ -1233,7 +1232,7 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMaskCommand() throws Exception {
String password1 = "password";
@ -1270,7 +1269,7 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMaskCommandWithPasswordCodec() throws Exception {
File instanceWithPasswordCodec = new File(temporaryFolder, "instance_with_password_codec");
Files.createDirectories(Paths.get(instanceWithPasswordCodec.getAbsolutePath(), "etc"));
@ -1300,13 +1299,13 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSimpleRun() throws Exception {
testSimpleRun("server");
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testProducerRetry() throws Exception {
File instanceFolder = newFolder(temporaryFolder, "server");
setupAuth(instanceFolder);
@ -1338,27 +1337,27 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testWeirdCharacter() throws Exception {
testSimpleRun("test%26%26x86_6");
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSpaces() throws Exception {
testSimpleRun("with space");
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCustomPort() throws Exception {
testSimpleRun("server", 61696);
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testPerfJournal() throws Exception {
File instanceFolder = newFolder(temporaryFolder, "server1");
setupAuth(instanceFolder);
@ -1487,13 +1486,13 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testAutoDeleteTrue() throws Exception {
testAutoDelete(true);
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testAutoDeleteFalse() throws Exception {
testAutoDelete(false);
}
@ -1546,7 +1545,7 @@ public class ArtemisTest extends CliTestBase {
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testPing() throws Exception {
File instanceFolder = newFolder(temporaryFolder, "pingTest");
@ -1569,7 +1568,7 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testAutoTune() throws Exception {
File instanceFolder = newFolder(temporaryFolder, "autoTuneTest");
@ -1591,7 +1590,7 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testQstat() throws Exception {
File instanceQstat = new File(temporaryFolder, "instanceQStat");
@ -1842,7 +1841,7 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testHugeQstat() throws Exception {
File instanceQstat = new File(temporaryFolder, "instanceQStat");
@ -1870,7 +1869,7 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testQstatColumnWidth() throws Exception {
File instanceQstat = new File(temporaryFolder, "instanceQStat");
@ -1943,7 +1942,7 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testQstatErrors() throws Exception {
File instanceQstat = new File(temporaryFolder, "instanceQStatErrors");
@ -2047,7 +2046,7 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testQstatWarnings() throws Exception {
File instanceQstat = new File(temporaryFolder, "instanceQStat");
@ -2130,7 +2129,7 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testRunPropertiesArgumentSetsAcceptorPort() throws Exception {
File instanceFile = new File(temporaryFolder, "testRunPropertiesArgumentSetsAcceptorPort");
setupAuth(instanceFile);
@ -2152,7 +2151,7 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testRunPropertiesDudArgument() throws Exception {
File instanceFile = new File(temporaryFolder, "testRunPropertiesDudArgument");
setupAuth(instanceFile);
@ -2166,7 +2165,7 @@ public class ArtemisTest extends CliTestBase {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testVersionCommand() throws Exception {
TestActionContext context = new TestActionContext();
PrintVersion printVersion = new PrintVersion();

View File

@ -329,7 +329,7 @@ public class NetworkHealthTest {
}
@Test
@Timeout(value = 30_000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testPurePingTimeout() throws Exception {
NetworkHealthCheck check = new NetworkHealthCheck(null, 100, 2000);

View File

@ -24,7 +24,6 @@ import java.io.IOException;
import java.io.OutputStream;
import java.lang.invoke.MethodHandles;
import java.util.Arrays;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.activemq.artemis.api.core.ActiveMQException;
@ -39,7 +38,7 @@ public class LargeMessageControllerImplTest {
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@Test
@Timeout(value = 10_000, unit = TimeUnit.MILLISECONDS)
@Timeout(10)
public void testControllerTimeout() throws Exception {
ClientConsumerInternal consumerMock = Mockito.mock(ClientConsumerInternal.class);

View File

@ -20,8 +20,6 @@ package org.apache.activemq.artemis.core.protocol.mqtt;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.concurrent.TimeUnit;
import io.netty.handler.codec.mqtt.MqttQoS;
import io.netty.handler.codec.mqtt.MqttSubscriptionOption;
import io.netty.handler.codec.mqtt.MqttTopicSubscription;
@ -34,7 +32,7 @@ import org.junit.jupiter.api.Timeout;
public class StateSerDeTest {
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testSerDe() throws Exception {
for (int i = 0; i < 500; i++) {
String clientId = RandomUtil.randomString();

View File

@ -20,7 +20,6 @@ import static org.junit.jupiter.api.Assertions.fail;
import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.util.concurrent.TimeUnit;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
@ -34,7 +33,7 @@ public class MainTest {
/* Tests what happens when no workdir arg is given and the default can't
* be accessed as not in container env, expect to throw IOE. */
@Test
@Timeout(value = 5000, unit = TimeUnit.MILLISECONDS)
@Timeout(5)
public void testNull() throws Exception {
try {
Main.main(new String[] {""});

View File

@ -81,7 +81,7 @@ import org.mockito.stubbing.Answer;
public class BackupActivationNoReconnectTest {
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void verifyReplicationBackupActivation() throws Exception {
ReplicationBackupPolicy policy = Mockito.mock(ReplicationBackupPolicy.class);
ReplicationPrimaryPolicy replicationPrimaryPolicy = Mockito.mock(ReplicationPrimaryPolicy.class);
@ -95,7 +95,7 @@ public class BackupActivationNoReconnectTest {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void verifySharedNothingBackupActivation() throws Exception {
ActiveMQServerImpl server = Mockito.mock(ActiveMQServerImpl.class);
when(server.isStarted()).thenReturn(true);

View File

@ -17,7 +17,6 @@
package org.apache.activemq.artemis.core.server.impl.jdbc;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
import org.apache.activemq.artemis.core.config.storage.DatabaseStorageConfiguration;
import org.apache.activemq.artemis.jdbc.store.drivers.JDBCUtils;
@ -58,7 +57,7 @@ public class JdbcSharedStateManagerTest extends ServerTestBase {
}
@Test
@Timeout(value = 10000, unit = TimeUnit.MILLISECONDS)
@Timeout(10)
public void shouldStartIfTableNotExist() throws Exception {
final JdbcSharedStateManager sharedStateManager = createSharedStateManager();
try {
@ -69,7 +68,7 @@ public class JdbcSharedStateManagerTest extends ServerTestBase {
}
@Test
@Timeout(value = 10000, unit = TimeUnit.MILLISECONDS)
@Timeout(10)
public void shouldStartIfTableExistEmpty() throws Exception {
final TestJDBCDriver fakeDriver = createFakeDriver(false);
fakeDriver.start();
@ -83,7 +82,7 @@ public class JdbcSharedStateManagerTest extends ServerTestBase {
}
@Test
@Timeout(value = 10000, unit = TimeUnit.MILLISECONDS)
@Timeout(10)
public void shouldStartIfTableExistInitialized() throws Exception {
final TestJDBCDriver fakeDriver = createFakeDriver(true);
fakeDriver.start();
@ -97,7 +96,7 @@ public class JdbcSharedStateManagerTest extends ServerTestBase {
}
@Test
@Timeout(value = 10000, unit = TimeUnit.MILLISECONDS)
@Timeout(10)
public void shouldStartTwoIfTableNotExist() throws Exception {
final JdbcSharedStateManager liveSharedStateManager = createSharedStateManager();
final JdbcSharedStateManager backupSharedStateManager = createSharedStateManager();

View File

@ -74,7 +74,7 @@ public class ConnectionDroppedTest extends ActiveMQTestBase {
}
@Test
@Timeout(value = 20_000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testConsumerDroppedWithProtonTestClient() throws Exception {
int NUMBER_OF_CONNECTIONS = 100;
ActiveMQServer server = createServer(true, createDefaultConfig(true));
@ -118,7 +118,7 @@ public class ConnectionDroppedTest extends ActiveMQTestBase {
}
@Test
@Timeout(value = 20_000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRegularClose() throws Exception {
int NUMBER_OF_CONNECTIONS = 100;
int REPEATS = 10;
@ -509,7 +509,7 @@ public class ConnectionDroppedTest extends ActiveMQTestBase {
@Test
@Timeout(value = 10_000, unit = TimeUnit.MILLISECONDS)
@Timeout(10)
public void testForceDropOpenWire() throws Throwable {
ActiveMQServer server = createServer(true, createDefaultConfig(true));
server.start();

View File

@ -16,8 +16,6 @@
*/
package org.apache.activemq.artemis.tests.integration.addressing;
import java.util.concurrent.TimeUnit;
import org.apache.activemq.artemis.api.core.RoutingType;
import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.api.core.client.ClientProducer;
@ -46,7 +44,7 @@ public class SendDLQNoRouteTest extends ActiveMQTestBase {
@Test
@Timeout(value = 20_000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testDLQNoRoute() throws Exception {
AddressSettings addressSettings = new AddressSettings().setSendToDLAOnNoRoute(true);
addressSettings.setDeadLetterAddress(SimpleString.toSimpleString("DLA"));

View File

@ -43,7 +43,7 @@ public class TwoWaysRemoveAddressTest extends ActiveMQTestBase {
private static Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testDeadLock() throws Throwable {
ActiveMQServer server = addServer(createServer(false));
server.start();

View File

@ -78,7 +78,7 @@ public class AmqpAnonymousRelayTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendMessageOnAnonymousProducerCausesQueueAutoCreation() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -120,7 +120,7 @@ public class AmqpAnonymousRelayTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendMessageOnAnonymousProducerCausesTopicAutoCreation() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -179,7 +179,7 @@ public class AmqpAnonymousRelayTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendMessageOnAnonymousProducerWithDestinationTypeAnnotationCausesQueueAutoCreation() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -225,7 +225,7 @@ public class AmqpAnonymousRelayTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendMessageOnAnonymousProducerWithDestinationTypeAnnotationCausesTopicAutoCreation() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -286,7 +286,7 @@ public class AmqpAnonymousRelayTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendMessageOnAnonymousRelayLinkUsingMessageTo() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -318,7 +318,7 @@ public class AmqpAnonymousRelayTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendMessageFailsOnAnonymousRelayLinkWhenNoToValueSet() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -346,7 +346,7 @@ public class AmqpAnonymousRelayTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendMessageFailsOnAnonymousRelayWhenToFieldHasNonExistingAddress() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());

View File

@ -30,7 +30,6 @@ import javax.jms.TextMessage;
import org.apache.activemq.artemis.api.core.QueueConfiguration;
import java.util.concurrent.TimeUnit;
import org.apache.activemq.artemis.api.core.RoutingType;
import org.apache.activemq.artemis.core.server.ActiveMQServer;
import org.apache.activemq.artemis.core.server.impl.AddressInfo;
@ -49,7 +48,7 @@ public class AmqpAnyCastDistinctQueueTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testDistinctQueueAddressAnyCast() throws Exception {
String ADDRESS_NAME = "DISTINCT_ADDRESS_testDistinctAddressAnyCast";
String QUEUE_NAME = "DISTINCT_QUEUE_testDistinctQUEUE_AnyCast";

View File

@ -76,7 +76,7 @@ public class AmqpBrokerRequestedHearbeatsTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testBrokerSendsHalfConfiguredIdleTimeout() throws Exception {
AmqpClient client = createAmqpClient();
assertNotNull(client);
@ -97,7 +97,7 @@ public class AmqpBrokerRequestedHearbeatsTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testBrokerSendsHalfConfiguredIdleTimeoutWhenClientSendsTimeout() throws Exception {
AmqpClient client = createAmqpClient();
assertNotNull(client);
@ -120,7 +120,7 @@ public class AmqpBrokerRequestedHearbeatsTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testClientWithoutHeartbeatsGetsDropped() throws Exception {
final CountDownLatch disconnected = new CountDownLatch(1);
@ -151,7 +151,7 @@ public class AmqpBrokerRequestedHearbeatsTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testClientWithHeartbeatsStaysAlive() throws Exception {
final CountDownLatch disconnected = new CountDownLatch(1);

View File

@ -41,7 +41,7 @@ public class AmqpDLQReceiverTest extends AmqpClientTestSupport {
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCreateDurableReceiver() throws Exception {
AmqpClient client = createAmqpClient();

View File

@ -40,7 +40,7 @@ public class AmqpDeliveryAnnotationsTest extends AmqpClientTestSupport {
private final String DELIVERY_ANNOTATION_NAME = "TEST-DELIVERY-ANNOTATION";
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testDeliveryAnnotationsStrippedFromIncoming() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());

View File

@ -51,7 +51,7 @@ import org.junit.jupiter.api.Timeout;
public class AmqpDescribedTypePayloadTest extends JMSClientTestSupport {
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendMessageWithDescribedTypeInBody() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -77,7 +77,7 @@ public class AmqpDescribedTypePayloadTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendMessageWithDescribedTypeInBodyReceiveOverOpenWire() throws Exception {
AmqpClient client = createAmqpClient();
@ -111,7 +111,7 @@ public class AmqpDescribedTypePayloadTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testDescribedTypeMessageRoundTrips() throws Exception {
AmqpClient client = createAmqpClient();

View File

@ -100,7 +100,7 @@ public class AmqpDurableReceiverReconnectWithMulticastPrefixTest extends JMSClie
}
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReattachToDurableNodeAndTryAndReceiveNewlySentMessage() throws Exception {
final String addressName = "test-address";
final String prefixedName = MULTICAST_PREFIX + addressName;
@ -148,7 +148,7 @@ public class AmqpDurableReceiverReconnectWithMulticastPrefixTest extends JMSClie
}
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReattachToDurableNodeAndTryAndReceivePreviouslySentMessage() throws Exception {
final String addressName = "test-address";
final String prefixedName = MULTICAST_PREFIX + addressName;

View File

@ -60,7 +60,7 @@ public class AmqpDurableReceiverTest extends AmqpClientTestSupport {
private final String SELECTOR_STRING = "color = red";
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCreateDurableReceiver() throws Exception {
AmqpClient client = createAmqpClient();
@ -89,7 +89,7 @@ public class AmqpDurableReceiverTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testDetachedDurableReceiverRemainsActive() throws Exception {
AmqpClient client = createAmqpClient();
@ -133,7 +133,7 @@ public class AmqpDurableReceiverTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCloseDurableReceiverRemovesSubscription() throws Exception {
AmqpClient client = createAmqpClient();
@ -154,7 +154,7 @@ public class AmqpDurableReceiverTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReattachToDurableNode() throws Exception {
AmqpClient client = createAmqpClient();
@ -175,7 +175,7 @@ public class AmqpDurableReceiverTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testLookupExistingSubscription() throws Exception {
AmqpClient client = createAmqpClient();
@ -217,7 +217,7 @@ public class AmqpDurableReceiverTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testLookupExistingSubscriptionWithSelector() throws Exception {
AmqpClient client = createAmqpClient();
@ -260,7 +260,7 @@ public class AmqpDurableReceiverTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testLookupExistingSubscriptionWithNoLocal() throws Exception {
AmqpClient client = createAmqpClient();
@ -301,7 +301,7 @@ public class AmqpDurableReceiverTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testLookupExistingSubscriptionWithSelectorAndNoLocal() throws Exception {
AmqpClient client = createAmqpClient();
@ -344,7 +344,7 @@ public class AmqpDurableReceiverTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testLookupNonExistingSubscription() throws Exception {
AmqpClient client = createAmqpClient();

View File

@ -63,7 +63,7 @@ public class AmqpExpiredMessageTest extends AmqpClientTestSupport {
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendMessageThatIsAlreadyExpiredUsingAbsoluteTime() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -94,7 +94,7 @@ public class AmqpExpiredMessageTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testExpiryThroughTTL() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -153,7 +153,7 @@ public class AmqpExpiredMessageTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testRetryExpiry() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -202,7 +202,7 @@ public class AmqpExpiredMessageTest extends AmqpClientTestSupport {
/** This test is validating a broker feature where the message copy through the DLQ will receive an annotation.
* It is also testing filter on that annotation. */
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testExpiryThroughTTLValidateAnnotation() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -275,7 +275,7 @@ public class AmqpExpiredMessageTest extends AmqpClientTestSupport {
/** This test is validating a broker feature where the message copy through the DLQ will receive an annotation.
* It is also testing filter on that annotation. */
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testExpiryQpidJMS() throws Exception {
ConnectionFactory factory = CFUtil.createConnectionFactory("AMQP", getBrokerAmqpConnectionURI().toString());
Connection connection = factory.createConnection();
@ -312,7 +312,7 @@ public class AmqpExpiredMessageTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendMessageThatIsNotExpiredUsingAbsoluteTime() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -344,7 +344,7 @@ public class AmqpExpiredMessageTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendMessageThatIsExiredUsingAbsoluteTimeWithLongTTL() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -378,7 +378,7 @@ public class AmqpExpiredMessageTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendMessageThatIsExpiredUsingTTLWhenAbsoluteIsZero() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -412,7 +412,7 @@ public class AmqpExpiredMessageTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendMessageThatIsNotExpiredUsingAbsoluteTimeWithElspsedTTL() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -446,7 +446,7 @@ public class AmqpExpiredMessageTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendMessageThatIsNotExpiredUsingTimeToLive() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -478,7 +478,7 @@ public class AmqpExpiredMessageTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendMessageThenAllowToExpiredUsingTimeToLive() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -512,13 +512,13 @@ public class AmqpExpiredMessageTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testExpiredMessageLandsInDLQ() throws Throwable {
internalSendExpiry(false);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testExpiredMessageLandsInDLQAndExistsAfterRestart() throws Throwable {
internalSendExpiry(true);
}
@ -568,7 +568,7 @@ public class AmqpExpiredMessageTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testExpirationAfterDivert() throws Throwable {
final String FORWARDING_ADDRESS = RandomUtil.randomString();
server.createQueue(new QueueConfiguration(FORWARDING_ADDRESS).setRoutingType(RoutingType.ANYCAST));
@ -634,7 +634,7 @@ public class AmqpExpiredMessageTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testDLQdMessageCanBeRedeliveredMultipleTimes() throws Throwable {
AmqpClient client = createAmqpClient();
AmqpConnection connection = client.connect();
@ -686,13 +686,13 @@ public class AmqpExpiredMessageTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testExpireThorughAddressSettings() throws Exception {
testExpireThorughAddressSettings(false);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testExpireThorughAddressSettingsRebootServer() throws Exception {
testExpireThorughAddressSettings(true);
}

View File

@ -28,7 +28,6 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import org.apache.activemq.artemis.api.core.TransportConfiguration;
import org.apache.activemq.artemis.core.config.ha.SharedStoreBackupPolicyConfiguration;
@ -90,7 +89,7 @@ public class AmqpFailoverEndpointDiscoveryTest extends FailoverTestBase {
}
@TestTemplate
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testFailoverListWithAMQP() throws Exception {
JmsConnectionFactory factory = getJmsConnectionFactory();
try (Connection connection = factory.createConnection()) {

View File

@ -41,7 +41,6 @@ import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import java.util.Map;
import java.util.concurrent.TimeUnit;
@ExtendWith(ParameterizedTestExtension.class)
public class AmqpFlowControlFailDispositionTests extends JMSClientTestSupport {
@ -79,7 +78,7 @@ public class AmqpFlowControlFailDispositionTests extends JMSClientTestSupport {
}
@TestTemplate
@Timeout(value = 10_000, unit = TimeUnit.MILLISECONDS)
@Timeout(10)
public void testAddressFullDisposition() throws Exception {
AmqpClient client = createAmqpClient(getBrokerAmqpConnectionURI());
AmqpConnection connection = client.connect();

View File

@ -83,7 +83,7 @@ public class AmqpFlowControlTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCreditsAreAllocatedOnceOnLinkCreated() throws Exception {
AmqpClient client = createAmqpClient(new URI(singleCreditAcceptorURI));
AmqpConnection connection = addConnection(client.connect());
@ -98,7 +98,7 @@ public class AmqpFlowControlTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCreditIsNotGivenOnLinkCreationWhileBlockedAndIsGivenOnceThenUnblocked() throws Exception {
AmqpClient client = createAmqpClient(new URI(singleCreditAcceptorURI));
AmqpConnection connection = addConnection(client.connect());
@ -132,7 +132,7 @@ public class AmqpFlowControlTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCreditsAreNotAllocatedWhenAddressIsFull() throws Exception {
AmqpClient client = createAmqpClient(new URI(singleCreditAcceptorURI));
AmqpConnection connection = addConnection(client.connect());
@ -156,7 +156,7 @@ public class AmqpFlowControlTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testAddressIsBlockedForOtherProducersWhenFull() throws Exception {
Connection connection = createConnection();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
@ -179,7 +179,7 @@ public class AmqpFlowControlTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendBlocksWhenAddressBlockedAndCompletesAfterUnblocked() throws Exception {
Connection connection = createConnection(new URI(singleCreditAcceptorURI.replace("tcp", "amqp")), null, null, null, true);
final Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
@ -225,7 +225,7 @@ public class AmqpFlowControlTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCreditsAreRefreshedWhenAddressIsUnblocked() throws Exception {
fillAddress(getQueueName());
@ -260,7 +260,7 @@ public class AmqpFlowControlTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testNewLinkAttachAreNotAllocatedCreditsWhenAddressIsBlocked() throws Exception {
fillAddress(getQueueName());
@ -280,7 +280,7 @@ public class AmqpFlowControlTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testTxIsRolledBackOnRejectedPreSettledMessage() throws Throwable {
// Create the link attach before filling the address to ensure the link is allocated credit.

View File

@ -23,7 +23,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
import java.lang.invoke.MethodHandles;
import java.util.HashMap;
import java.util.concurrent.TimeUnit;
import javax.jms.Connection;
import javax.jms.InvalidDestinationException;
@ -207,7 +206,7 @@ public class AmqpFullyQualifiedNameTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
//there isn't much use of FQQN for topics
//however we can test query functionality
public void testTopic() throws Exception {

View File

@ -31,7 +31,6 @@ import static org.junit.jupiter.api.Assertions.fail;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import org.apache.activemq.artemis.protocol.amqp.proton.AmqpSupport;
import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
@ -61,7 +60,7 @@ public class AmqpInboundConnectionTest extends AmqpClientTestSupport {
private static final String PRODUCT_NAME = "apache-activemq-artemis";
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCloseIsSentOnConnectionClose() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection amqpConnection = client.connect();
@ -80,7 +79,7 @@ public class AmqpInboundConnectionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testBrokerContainerId() throws Exception {
final String containerId = server.getNodeID().toString();
@ -107,7 +106,7 @@ public class AmqpInboundConnectionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testDefaultMaxFrameSize() throws Exception {
AmqpClient client = createAmqpClient();
assertNotNull(client);
@ -133,7 +132,7 @@ public class AmqpInboundConnectionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testBrokerConnectionProperties() throws Exception {
AmqpClient client = createAmqpClient();
@ -176,7 +175,7 @@ public class AmqpInboundConnectionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testConnectionCarriesExpectedCapabilities() throws Exception {
AmqpClient client = createAmqpClient();
assertNotNull(client);
@ -210,7 +209,7 @@ public class AmqpInboundConnectionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCanConnectWithDifferentContainerIds() throws Exception {
AmqpClient client = createAmqpClient();
assertNotNull(client);
@ -235,7 +234,7 @@ public class AmqpInboundConnectionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCannotConnectWithSameContainerId() throws Exception {
AmqpClient client = createAmqpClient();

View File

@ -72,19 +72,19 @@ public class AmqpIngressTimestampTest extends AmqpClientTestSupport {
public boolean large;
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testIngressTimestampSendCore() throws Exception {
internalTestIngressTimestamp(Protocol.CORE);
}
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testIngressTimestampSendAMQP() throws Exception {
internalTestIngressTimestamp(Protocol.AMQP);
}
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testIngressTimestampSendOpenWire() throws Exception {
internalTestIngressTimestamp(Protocol.OPENWIRE);
}

View File

@ -137,7 +137,7 @@ public class AmqpLargeMessageTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendAMQPReceiveCore() throws Exception {
server.getAddressSettingsRepository().addMatch("#", new AddressSettings().setDefaultAddressRoutingType(RoutingType.ANYCAST));
@ -159,7 +159,7 @@ public class AmqpLargeMessageTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendAndGetData() throws Exception {
server.getAddressSettingsRepository().addMatch("#", new AddressSettings().setDefaultAddressRoutingType(RoutingType.ANYCAST));
@ -201,7 +201,7 @@ public class AmqpLargeMessageTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendAMQPMessageWithComplexAnnotationsReceiveCore() throws Exception {
server.getAddressSettingsRepository().addMatch("#", new AddressSettings().setDefaultAddressRoutingType(RoutingType.ANYCAST));
@ -248,7 +248,7 @@ public class AmqpLargeMessageTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendAMQPReceiveOpenWire() throws Exception {
server.getAddressSettingsRepository().addMatch("#", new AddressSettings().setDefaultAddressRoutingType(RoutingType.ANYCAST));
@ -301,7 +301,7 @@ public class AmqpLargeMessageTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendAMQPReceiveAMQP() throws Exception {
server.getAddressSettingsRepository().addMatch("#", new AddressSettings().setDefaultAddressRoutingType(RoutingType.ANYCAST));
@ -340,7 +340,7 @@ public class AmqpLargeMessageTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendAMQPMessageWithComplexAnnotationsReceiveAMQP() throws Exception {
server.getAddressSettingsRepository().addMatch("#", new AddressSettings().setDefaultAddressRoutingType(RoutingType.ANYCAST));
@ -397,7 +397,7 @@ public class AmqpLargeMessageTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testHugeString() throws Exception {
ConnectionFactory factory = CFUtil.createConnectionFactory("AMQP", "tcp://localhost:5672");
Connection connection = factory.createConnection();
@ -430,7 +430,7 @@ public class AmqpLargeMessageTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendAMQPReceiveAMQPViaJMSObjectMessage() throws Exception {
server.getAddressSettingsRepository().addMatch("#", new AddressSettings().setDefaultAddressRoutingType(RoutingType.ANYCAST));
@ -448,7 +448,7 @@ public class AmqpLargeMessageTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendAMQPReceiveAMQPViaJMSText() throws Exception {
server.getAddressSettingsRepository().addMatch("#", new AddressSettings().setDefaultAddressRoutingType(RoutingType.ANYCAST));
@ -466,7 +466,7 @@ public class AmqpLargeMessageTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendAMQPReceiveAMQPViaJMSBytes() throws Exception {
server.getAddressSettingsRepository().addMatch("#", new AddressSettings().setDefaultAddressRoutingType(RoutingType.ANYCAST));
@ -494,14 +494,14 @@ public class AmqpLargeMessageTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendHugeHeader() throws Exception {
assumeFalse(jdbc); // the checked rule with the property size will not be applied to JDBC, hence we skip the test
doTestSendHugeHeader(payload);
}
@TestTemplate
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendLargeMessageWithHugeHeader() throws Exception {
assumeFalse(jdbc); // the checked rule with the property size will not be applied to JDBC, hence we skip the test
doTestSendHugeHeader(1024 * 1024);
@ -618,7 +618,7 @@ public class AmqpLargeMessageTest extends AmqpClientTestSupport {
@TestTemplate
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendSmallerMessages() throws Exception {
for (int i = 512; i <= (8 * 1024); i += 512) {
doTestSendLargeMessage(i);
@ -626,7 +626,7 @@ public class AmqpLargeMessageTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 120_000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testSendFixedSizedMessages() throws Exception {
doTestSendLargeMessage(65536);
doTestSendLargeMessage(65536 * 2);
@ -634,21 +634,21 @@ public class AmqpLargeMessageTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 120_000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testSend1MBMessage() throws Exception {
doTestSendLargeMessage(1024 * 1024);
}
@Disabled("Useful for performance testing")
@TestTemplate
@Timeout(value = 120_000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testSend10MBMessage() throws Exception {
doTestSendLargeMessage(1024 * 1024 * 10);
}
@Disabled("Useful for performance testing")
@TestTemplate
@Timeout(value = 120_000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testSend100MBMessage() throws Exception {
doTestSendLargeMessage(1024 * 1024 * 100);
}
@ -696,7 +696,7 @@ public class AmqpLargeMessageTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReceiveRedeliveredLargeMessagesWithSessionFlowControl() throws Exception {
server.getAddressSettingsRepository().addMatch("#", new AddressSettings().setDefaultAddressRoutingType(RoutingType.ANYCAST));
@ -764,7 +764,7 @@ public class AmqpLargeMessageTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReceiveLargeMessagesMultiplexedOnSameSession() throws Exception {
server.getAddressSettingsRepository().addMatch("#", new AddressSettings().setDefaultAddressRoutingType(RoutingType.ANYCAST));
@ -895,7 +895,7 @@ public class AmqpLargeMessageTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMessageWithAmqpValueAndEmptyBinaryPreservesBody() throws Exception {
server.getAddressSettingsRepository().addMatch("#", new AddressSettings().setDefaultAddressRoutingType(RoutingType.ANYCAST));
@ -933,7 +933,7 @@ public class AmqpLargeMessageTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMessageWithDataAndEmptyBinaryPreservesBody() throws Exception {
server.getAddressSettingsRepository().addMatch("#", new AddressSettings().setDefaultAddressRoutingType(RoutingType.ANYCAST));
@ -971,7 +971,7 @@ public class AmqpLargeMessageTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMessageWithDataAndContentTypeOfTextPreservesBodyType() throws Exception {
server.getAddressSettingsRepository().addMatch("#", new AddressSettings().setDefaultAddressRoutingType(RoutingType.ANYCAST));
@ -1017,7 +1017,7 @@ public class AmqpLargeMessageTest extends AmqpClientTestSupport {
@SuppressWarnings({ "unchecked", "rawtypes" })
@TestTemplate
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMessageWithAmqpValueListPreservesBodyType() throws Exception {
server.getAddressSettingsRepository().addMatch("#", new AddressSettings().setDefaultAddressRoutingType(RoutingType.ANYCAST));
@ -1061,7 +1061,7 @@ public class AmqpLargeMessageTest extends AmqpClientTestSupport {
@SuppressWarnings({ "unchecked", "rawtypes" })
@TestTemplate
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMessageWithAmqpSequencePreservesBodyType() throws Exception {
server.getAddressSettingsRepository().addMatch("#", new AddressSettings().setDefaultAddressRoutingType(RoutingType.ANYCAST));

View File

@ -49,7 +49,7 @@ public class AmqpManagementTest extends AmqpClientTestSupport {
private static final Binary BINARY_CORRELATION_ID = new Binary("mystring".getBytes(StandardCharsets.UTF_8));
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testManagementQueryOverAMQP() throws Throwable {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -89,7 +89,7 @@ public class AmqpManagementTest extends AmqpClientTestSupport {
* @throws Exception
*/
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testUnsignedValues() throws Exception {
int sequence = 42;
LinkedHashMap<String, Object> map = new LinkedHashMap<>();
@ -114,37 +114,37 @@ public class AmqpManagementTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCorrelationByMessageIDUUID() throws Throwable {
doTestReplyCorrelation(UUID.randomUUID(), false);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCorrelationByMessageIDString() throws Throwable {
doTestReplyCorrelation("mystring", false);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCorrelationByMessageIDBinary() throws Throwable {
doTestReplyCorrelation(BINARY_CORRELATION_ID, false);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCorrelationByCorrelationIDUUID() throws Throwable {
doTestReplyCorrelation(UUID.randomUUID(), true);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCorrelationByCorrelationIDString() throws Throwable {
doTestReplyCorrelation("mystring", true);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCorrelationByCorrelationIDBinary() throws Throwable {
doTestReplyCorrelation(BINARY_CORRELATION_ID, true);
}

View File

@ -69,7 +69,7 @@ public class AmqpMaxFrameSizeTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testBrokerAdvertisedDefaultMaxFrameSize() throws Exception {
assertFalse(maxFrameSizeConfigSet, "maxFrameSize should not be explicitly configured");
@ -97,7 +97,7 @@ public class AmqpMaxFrameSizeTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testBrokerAdvertisedConfiguredMaxFrameSize() throws Exception {
assertTrue(maxFrameSizeConfigSet, "maxFrameSize should be explicitly configured");
@ -125,7 +125,7 @@ public class AmqpMaxFrameSizeTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testManyMultiFrameTransfersWithClientMaxFrameSizeSmallerThanBrokers() throws Exception {
final int clientMaxFrameSize = 1024;
final int brokerMaxFrameSize = AmqpSupport.MAX_FRAME_SIZE_DEFAULT;
@ -137,7 +137,7 @@ public class AmqpMaxFrameSizeTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testManyMultiFrameTransfersWithClientMaxFrameSizeLargerThanBrokers() throws Exception {
final int clientMaxFrameSize = 2 * AmqpSupport.MAX_FRAME_SIZE_DEFAULT;
final int brokerMaxFrameSize = AmqpSupport.MAX_FRAME_SIZE_DEFAULT;
@ -202,7 +202,7 @@ public class AmqpMaxFrameSizeTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSingleAndMultiFrameTransferClientMaxFrameSizeSmallerThanBrokers() throws Exception {
final int clientMaxFrameSize = 1024;
final int brokerMaxFrameSize = AmqpSupport.MAX_FRAME_SIZE_DEFAULT;
@ -213,7 +213,7 @@ public class AmqpMaxFrameSizeTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSingleAndMultiFrameTransferWithClientMaxFrameSizeLargerThanBrokers() throws Exception {
final int clientMaxFrameSize = 2 * AmqpSupport.MAX_FRAME_SIZE_DEFAULT;
final int brokerMaxFrameSize = AmqpSupport.MAX_FRAME_SIZE_DEFAULT;

View File

@ -57,13 +57,13 @@ public class AmqpMessageDivertsTest extends AmqpClientTestSupport implements Tra
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testQueueReceiverReadMessageWithDivert() throws Exception {
runQueueReceiverReadMessageWithDivert(ComponentConfigurationRoutingType.ANYCAST.toString());
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testQueueReceiverReadMessageWithDivertDefaultRouting() throws Exception {
runQueueReceiverReadMessageWithDivert(ActiveMQDefaultConfiguration.getDefaultDivertRoutingType());
}

View File

@ -43,7 +43,7 @@ public class AmqpMessagePriorityTest extends AmqpClientTestSupport {
protected static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMessageDefaultPriority() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -75,7 +75,7 @@ public class AmqpMessagePriorityTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMessagePriorityPreservedAfterServerRestart() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -116,7 +116,7 @@ public class AmqpMessagePriorityTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMessageNonDefaultPriority() throws Exception {
AmqpClient client = createAmqpClient();
@ -149,7 +149,7 @@ public class AmqpMessagePriorityTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMessageWithVeryHighPriority() throws Exception {
AmqpClient client = createAmqpClient();
@ -181,7 +181,7 @@ public class AmqpMessagePriorityTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMessageNoPriority() throws Exception {
AmqpClient client = createAmqpClient();
@ -213,7 +213,7 @@ public class AmqpMessagePriorityTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMessagePriorityOrdering() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());

View File

@ -29,7 +29,6 @@ import javax.jms.Topic;
import org.apache.activemq.artemis.api.core.QueueConfiguration;
import java.util.concurrent.TimeUnit;
import org.apache.activemq.artemis.api.core.RoutingType;
import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.api.core.management.ActiveMQServerControl;
@ -57,7 +56,7 @@ public class AmqpMessageRoutingTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testAnycastMessageRoutingExclusivityUsingPrefix() throws Exception {
final String addressA = "addressA";
final String queueA = "queueA";
@ -77,7 +76,7 @@ public class AmqpMessageRoutingTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testAnycastMessageRoutingExclusivityUsingProperty() throws Exception {
final String addressA = "addressA";
final String queueA = "queueA";
@ -97,7 +96,7 @@ public class AmqpMessageRoutingTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMulticastMessageRoutingExclusivityUsingPrefix() throws Exception {
final String addressA = "addressA";
final String queueA = "queueA";
@ -117,7 +116,7 @@ public class AmqpMessageRoutingTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMulticastMessageRoutingExclusivityUsingProperty() throws Exception {
final String addressA = "addressA";
final String queueA = "queueA";
@ -144,7 +143,7 @@ public class AmqpMessageRoutingTest extends JMSClientTestSupport {
* @throws Exception
*/
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testRoutingExclusivity() throws Exception {
// Create Address with both ANYCAST and MULTICAST enabled
@ -182,19 +181,19 @@ public class AmqpMessageRoutingTest extends JMSClientTestSupport {
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testAMQPRouteMessageToJMSOpenWire() throws Throwable {
testAMQPRouteMessageToJMS(createOpenWireConnection());
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testAMQPRouteMessageToJMSAMQP() throws Throwable {
testAMQPRouteMessageToJMS(createConnection());
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testAMQPRouteMessageToJMSCore() throws Throwable {
testAMQPRouteMessageToJMS(createCoreConnection());
}

View File

@ -77,7 +77,7 @@ public class AmqpNoHearbeatsTest extends AmqpClientTestSupport {
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testHeartless() throws Exception {
AmqpClient client = createAmqpClient();
assertNotNull(client);
@ -101,7 +101,7 @@ public class AmqpNoHearbeatsTest extends AmqpClientTestSupport {
// This is done by setting soLinger=0 on the socket, which will make the system to issue a connection.reset instead of sending a
// disconnect.
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCloseConsumerOnConnectionReset() throws Exception {
AmqpClient client = createAmqpClient();

View File

@ -20,7 +20,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.activemq.artemis.api.core.SimpleString;
@ -38,7 +37,7 @@ import org.junit.jupiter.api.Timeout;
public class AmqpNonDurableReceiverTest extends AmqpClientTestSupport {
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testLinkDetachReleasesResources() throws Exception {
AmqpClient client = createAmqpClient();

View File

@ -26,7 +26,6 @@ import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
@ -55,19 +54,19 @@ public class AmqpOutboundConnectionTest extends AmqpClientTestSupport {
private boolean securityEnabled;
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testOutboundConnection() throws Throwable {
runOutboundConnectionTest(false, true);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testOutboundConnectionServerClose() throws Throwable {
runOutboundConnectionTest(false, false);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testOutboundConnectionWithSecurity() throws Throwable {
runOutboundConnectionTest(true, true);
}

View File

@ -25,7 +25,6 @@ import java.io.OutputStream;
import java.lang.invoke.MethodHandles;
import java.net.Socket;
import java.nio.ByteBuffer;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
@ -55,7 +54,7 @@ public class AmqpPipelinedConnectTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 30_000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testPipelinedOpenWhenAnonymousWillFail() throws Exception {
// Frame data for: SaslInit

View File

@ -45,7 +45,7 @@ public class AmqpPresettledReceiverTest extends AmqpClientTestSupport {
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testPresettledReceiverAndNonPresettledReceiverOnSameQueue() throws Exception {
final int MSG_COUNT = 2;
sendMessages(getQueueName(), MSG_COUNT);
@ -96,7 +96,7 @@ public class AmqpPresettledReceiverTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testPresettledReceiverReadsAllMessages() throws Exception {
final int MSG_COUNT = 100;
sendMessages(getQueueName(), MSG_COUNT);
@ -133,7 +133,7 @@ public class AmqpPresettledReceiverTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testPresettledReceiverReadsAllMessagesInWhenReadInBatches() throws Exception {
final int MSG_COUNT = 100;
sendMessages(getQueueName(), MSG_COUNT);
@ -186,13 +186,13 @@ public class AmqpPresettledReceiverTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testPresettledReceiverWithinBoundsOfActiveTXWithCommit() throws Exception {
doTestPresettledReceiverWithinBoundsOfActiveTX(true);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testPresettledReceiverWithinBoundsOfActiveTXWithRollback() throws Exception {
doTestPresettledReceiverWithinBoundsOfActiveTX(false);
}
@ -233,7 +233,7 @@ public class AmqpPresettledReceiverTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testPresettledReceiverWithinBoundsOfActiveTXWithSendAndRollback() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());

View File

@ -39,7 +39,7 @@ public class AmqpProtocolHeaderHandlingTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testNonSaslHeaderRejectedOnConnect() throws Exception {
final AmqpHeader header = new AmqpHeader();

View File

@ -51,7 +51,7 @@ public class AmqpPurgeOnNoConsumersTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testQueueReceiverReadMessage() throws Exception {
AmqpConnection connection = null;
String queue = "purgeQueue";
@ -109,7 +109,7 @@ public class AmqpPurgeOnNoConsumersTest extends AmqpClientTestSupport {
// I'm adding the core test here to compare semantics between AMQP and core on this test.
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testPurgeQueueCoreRollback() throws Exception {
String queue = "purgeQueue";
SimpleString ssQueue = new SimpleString(queue);

View File

@ -39,7 +39,7 @@ public class AmqpReceiverDispositionRejectAsUnmodifiedModeTests extends AmqpClie
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testRejectedDisposition() throws Exception {
sendMessages(getQueueName(), 1);

View File

@ -41,7 +41,7 @@ import org.junit.jupiter.api.Timeout;
public class AmqpReceiverDispositionTest extends AmqpClientTestSupport {
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testReleasedDisposition() throws Exception {
sendMessages(getQueueName(), 1);
@ -81,7 +81,7 @@ public class AmqpReceiverDispositionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testRejectedDisposition() throws Exception {
sendMessages(getQueueName(), 1);
@ -117,25 +117,25 @@ public class AmqpReceiverDispositionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testModifiedDispositionWithDeliveryFailedWithoutUndeliverableHereFieldsSet() throws Exception {
doModifiedDispositionTestImpl(Boolean.TRUE, null);
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testModifiedDispositionWithoutDeliveryFailedWithoutUndeliverableHereFieldsSet() throws Exception {
doModifiedDispositionTestImpl(null, null);
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testModifiedDispositionWithoutDeliveryFailedWithUndeliverableHereFieldsSet() throws Exception {
doModifiedDispositionTestImpl(null, Boolean.TRUE);
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testModifiedDispositionWithDeliveryFailedWithUndeliverableHereFieldsSet() throws Exception {
doModifiedDispositionTestImpl(Boolean.TRUE, Boolean.TRUE);
}

View File

@ -43,13 +43,13 @@ public class AmqpReceiverDrainTest extends AmqpClientTestSupport {
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReceiverCanDrainMessagesQueue() throws Exception {
doTestReceiverCanDrainMessages(false);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReceiverCanDrainMessagesTopic() throws Exception {
doTestReceiverCanDrainMessages(true);
}
@ -90,13 +90,13 @@ public class AmqpReceiverDrainTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testPullWithNoMessageGetDrainedQueue() throws Exception {
doTestPullWithNoMessageGetDrained(false);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testPullWithNoMessageGetDrainedTopic() throws Exception {
doTestPullWithNoMessageGetDrained(true);
}
@ -133,13 +133,13 @@ public class AmqpReceiverDrainTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testPullOneFromRemoteQueue() throws Exception {
doTestPullOneFromRemote(false);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testPullOneFromRemoteTopic() throws Exception {
doTestPullOneFromRemote(true);
}
@ -180,13 +180,13 @@ public class AmqpReceiverDrainTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMultipleZeroResultPullsQueue() throws Exception {
doTestMultipleZeroResultPulls(false);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMultipleZeroResultPullsTopic() throws Exception {
doTestMultipleZeroResultPulls(true);
}

View File

@ -41,7 +41,7 @@ import java.util.concurrent.TimeUnit;
public class AmqpReceiverPriorityTest extends AmqpClientTestSupport {
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testPriority() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -99,7 +99,7 @@ public class AmqpReceiverPriorityTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testPrioritySetOnAddress() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -154,7 +154,7 @@ public class AmqpReceiverPriorityTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testAttachPropertiesPriorityTakesPrecedenceOverAddress() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -215,7 +215,7 @@ public class AmqpReceiverPriorityTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testBadValueInPriorityPropertyOnAddress() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -240,13 +240,13 @@ public class AmqpReceiverPriorityTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testPriorityProvidedAsByte() throws Exception {
testPriorityNumber((byte) 5);
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testPriorityProvidedAsUnsignedInteger() throws Exception {
testPriorityNumber(UnsignedInteger.valueOf(5));
}

View File

@ -26,7 +26,6 @@ import static org.junit.jupiter.api.Assertions.fail;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.jms.JMSException;
@ -61,7 +60,7 @@ import org.junit.jupiter.api.Timeout;
public class AmqpReceiverTest extends AmqpClientTestSupport {
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCreateQueueReceiver() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -77,7 +76,7 @@ public class AmqpReceiverTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCreateTopicReceiver() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -94,7 +93,7 @@ public class AmqpReceiverTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCreateQueueReceiverWithNoLocalSet() throws Exception {
AmqpClient client = createAmqpClient();
@ -128,7 +127,7 @@ public class AmqpReceiverTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCreateQueueReceiverWithJMSSelector() throws Exception {
AmqpClient client = createAmqpClient();
@ -161,7 +160,7 @@ public class AmqpReceiverTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testInvalidFilter() throws Exception {
AmqpClient client = createAmqpClient();
@ -179,19 +178,19 @@ public class AmqpReceiverTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSenderSettlementModeSettledIsHonored() throws Exception {
doTestSenderSettlementModeIsHonored(SenderSettleMode.SETTLED);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSenderSettlementModeUnsettledIsHonored() throws Exception {
doTestSenderSettlementModeIsHonored(SenderSettleMode.UNSETTLED);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSenderSettlementModeMixedIsHonored() throws Exception {
doTestSenderSettlementModeIsHonored(SenderSettleMode.MIXED);
}
@ -216,13 +215,13 @@ public class AmqpReceiverTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReceiverSettlementModeSetToFirst() throws Exception {
doTestReceiverSettlementModeForcedToFirst(ReceiverSettleMode.FIRST);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReceiverSettlementModeSetToSecond() throws Exception {
doTestReceiverSettlementModeForcedToFirst(ReceiverSettleMode.SECOND);
}
@ -251,7 +250,7 @@ public class AmqpReceiverTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testClientIdIsSetInSubscriptionList() throws Exception {
server.addAddressInfo(new AddressInfo(SimpleString.toSimpleString("mytopic"), RoutingType.ANYCAST));
@ -280,7 +279,7 @@ public class AmqpReceiverTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testLinkDetachSentWhenQueueDeleted() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -298,7 +297,7 @@ public class AmqpReceiverTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testLinkDetatchErrorIsCorrectWhenQueueDoesNotExists() throws Exception {
AddressSettings value = new AddressSettings();
value.setAutoCreateQueues(false);
@ -328,7 +327,7 @@ public class AmqpReceiverTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testUnsupportedFiltersAreNotListedAsSupported() throws Exception {
AmqpClient client = createAmqpClient();
@ -374,7 +373,7 @@ public class AmqpReceiverTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReceiverCloseSendsRemoteClose() throws Exception {
AmqpClient client = createAmqpClient();
assertNotNull(client);

View File

@ -56,7 +56,7 @@ public class AmqpReceiverWithFiltersTest extends AmqpClientTestSupport {
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testUnsupportedFiltersAreNotListedAsSupported() throws Exception {
AmqpClient client = createAmqpClient();
@ -100,7 +100,7 @@ public class AmqpReceiverWithFiltersTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSupportedFiltersAreListedAsSupported() throws Exception {
AmqpClient client = createAmqpClient();
@ -133,7 +133,7 @@ public class AmqpReceiverWithFiltersTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReceivedUnsignedFilter() throws Exception {
final int NUM_MESSAGES = 100;

View File

@ -45,7 +45,7 @@ import org.junit.jupiter.api.Timeout;
public class AmqpScheduledMessageTest extends AmqpClientTestSupport {
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendWithDeliveryTimeIsScheduled() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -79,7 +79,7 @@ public class AmqpScheduledMessageTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendRecvWithDeliveryTime() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -132,7 +132,7 @@ public class AmqpScheduledMessageTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testScheduleWithDelay() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -172,7 +172,7 @@ public class AmqpScheduledMessageTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendWithDeliveryTimeHoldsMessage() throws Exception {
AmqpClient client = createAmqpClient();
assertNotNull(client);
@ -201,7 +201,7 @@ public class AmqpScheduledMessageTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendWithDeliveryTimeDeliversMessageAfterDelay() throws Exception {
AmqpClient client = createAmqpClient();
assertNotNull(client);

View File

@ -51,7 +51,7 @@ public class AmqpSecurityTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSaslAuthWithInvalidCredentials() throws Exception {
AmqpConnection connection = null;
AmqpClient client = createAmqpClient(guestUser, fullUser);
@ -69,7 +69,7 @@ public class AmqpSecurityTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSaslAuthWithAuthzid() throws Exception {
AmqpConnection connection = null;
AmqpClient client = createAmqpClient(guestPass, guestUser);
@ -87,7 +87,7 @@ public class AmqpSecurityTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSaslAuthWithoutAuthzid() throws Exception {
AmqpConnection connection = null;
AmqpClient client = createAmqpClient(guestPass, guestUser);
@ -104,7 +104,7 @@ public class AmqpSecurityTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendAndRejected() throws Exception {
AmqpClient client = createAmqpClient(guestPass, guestUser);
client.setValidator(new AmqpValidator() {
@ -141,7 +141,7 @@ public class AmqpSecurityTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendMessageFailsOnAnonymousRelayWhenNotAuthorizedToSendToAddress() throws Exception {
CountDownLatch latch = new CountDownLatch(1);
@ -203,7 +203,7 @@ public class AmqpSecurityTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testReceiverNotAuthorized() throws Exception {
AmqpClient client = createAmqpClient(noprivPass, noprivUser);
client.setValidator(new AmqpValidator() {
@ -241,7 +241,7 @@ public class AmqpSecurityTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testConsumerNotAuthorizedToCreateQueues() throws Exception {
AmqpClient client = createAmqpClient(noprivPass, noprivUser);
client.setValidator(new AmqpValidator() {

View File

@ -48,7 +48,7 @@ import java.util.concurrent.TimeUnit;
public class AmqpSendReceiveInterceptorTest extends AmqpClientTestSupport {
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCreateQueueReceiver() throws Exception {
final CountDownLatch latch = new CountDownLatch(1);
server.getRemotingService().addIncomingInterceptor(new AmqpInterceptor() {
@ -89,7 +89,7 @@ public class AmqpSendReceiveInterceptorTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testRejectMessageWithIncomingInterceptor() throws Exception {
final CountDownLatch latch = new CountDownLatch(1);
server.getRemotingService().addIncomingInterceptor(new AmqpInterceptor() {
@ -126,7 +126,7 @@ public class AmqpSendReceiveInterceptorTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testRejectMessageWithOutgoingInterceptor() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -188,7 +188,7 @@ public class AmqpSendReceiveInterceptorTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCheckInterceptedMessageProperties() throws Exception {
final CountDownLatch latch = new CountDownLatch(1);
@ -256,7 +256,7 @@ public class AmqpSendReceiveInterceptorTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCheckRemotingConnection() throws Exception {
final CountDownLatch latch = new CountDownLatch(1);
final boolean[] passed = {false};

View File

@ -82,7 +82,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testAcceptWithoutSettling() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -108,7 +108,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testQueueReceiverReadMessage() throws Exception {
sendMessages(getQueueName(), 1);
@ -131,7 +131,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCoreBridge() throws Exception {
server.getRemotingService().createAcceptor("acceptor", "vm://0").start();
server.getConfiguration().addConnectorConfiguration("connector", "vm://0");
@ -169,7 +169,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMessageDurableFalse() throws Exception {
sendMessages(getQueueName(), 1, false);
@ -194,7 +194,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMessageDurableTrue() throws Exception {
assertNotNull(server.locateQueue(getQueueName()));
sendMessages(getQueueName(), 1, true);
@ -220,7 +220,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testTwoQueueReceiversOnSameConnectionReadMessagesNoDispositions() throws Exception {
int MSG_COUNT = 4;
sendMessages(getQueueName(), MSG_COUNT);
@ -257,7 +257,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testTwoQueueReceiversOnSameConnectionReadMessagesAcceptOnEach() throws Exception {
int MSG_COUNT = 4;
sendMessages(getQueueName(), MSG_COUNT);
@ -316,7 +316,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSecondReceiverOnQueueGetsAllUnconsumedMessages() throws Exception {
int MSG_COUNT = 20;
sendMessages(getQueueName(), MSG_COUNT);
@ -370,7 +370,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSimpleSendOneReceiveOne() throws Exception {
AmqpClient client = createAmqpClient();
@ -402,7 +402,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendFilterAnnotation() throws Exception {
AmqpClient client = createAmqpClient();
@ -442,7 +442,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCloseBusyReceiver() throws Exception {
final int MSG_COUNT = 20;
@ -489,7 +489,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReceiveWithJMSSelectorFilter() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -523,7 +523,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReceiveWithJMSSelectorFilterOnJMSType() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -555,7 +555,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testAdvancedLinkFlowControl() throws Exception {
final int MSG_COUNT = 20;
@ -617,7 +617,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testDispatchOrderWithPrefetchOfOne() throws Exception {
final int MSG_COUNT = 20;
@ -693,7 +693,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReceiveMessageAndRefillCreditBeforeAccept() throws Exception {
AmqpClient client = createAmqpClient();
@ -728,7 +728,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReceiveMessageAndRefillCreditBeforeAcceptOnQueueAsync() throws Exception {
final AmqpClient client = createAmqpClient();
final LinkedList<Throwable> errors = new LinkedList<>();
@ -795,7 +795,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMessageDurabliltyFollowsSpec() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -839,25 +839,25 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMessageWithHeaderMarkedDurableIsPersisted() throws Exception {
doTestBrokerRestartAndDurability(true, true, false);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMessageWithHeaderMarkedNonDurableIsNotPersisted() throws Exception {
doTestBrokerRestartAndDurability(false, true, true);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMessageWithHeaderDefaultedNonDurableIsNotPersisted() throws Exception {
doTestBrokerRestartAndDurability(false, true, false);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMessageWithNoHeaderIsNotPersisted() throws Exception {
doTestBrokerRestartAndDurability(false, false, false);
}
@ -930,7 +930,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReceiveMessageBeyondAckedAmountQueue() throws Exception {
final int MSG_COUNT = 50;
@ -979,7 +979,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testTwoPresettledReceiversReceiveAllMessages() throws Exception {
final int MSG_COUNT = 100;
@ -1049,7 +1049,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testDeliveryDelayOfferedWhenRequested() throws Exception {
AmqpClient client = createAmqpClient();
client.setValidator(new AmqpValidator() {
@ -1077,31 +1077,31 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMessageWithToFieldSetToSenderAddress() throws Exception {
doTestMessageWithToFieldSet(false, getQueueName());
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMessageWithToFieldSetToRandomAddress() throws Exception {
doTestMessageWithToFieldSet(false, UUID.randomUUID().toString());
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMessageWithToFieldSetToEmpty() throws Exception {
doTestMessageWithToFieldSet(false, "");
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMessageWithToFieldSetToNull() throws Exception {
doTestMessageWithToFieldSet(false, null);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMessageWithToFieldSetWithAnonymousSender() throws Exception {
doTestMessageWithToFieldSet(true, getQueueName());
}
@ -1137,7 +1137,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testLinkDetatchErrorIsCorrectWhenQueueDoesNotExists() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -1159,7 +1159,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendingAndReceivingToQueueWithDifferentAddressAndQueueName() throws Exception {
String queueName = "TestQueueName";
String address = "TestAddress";
@ -1187,13 +1187,13 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendReceiveLotsOfDurableMessagesOnQueue() throws Exception {
doTestSendReceiveLotsOfDurableMessages(Queue.class);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendReceiveLotsOfDurableMessagesOnTopic() throws Exception {
doTestSendReceiveLotsOfDurableMessages(Topic.class);
}
@ -1258,7 +1258,7 @@ public class AmqpSendReceiveTest extends AmqpClientTestSupport {
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReceiveRejecting() throws Exception {
final int MSG_COUNT = 1000;

View File

@ -84,19 +84,19 @@ public class AmqpSenderTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSenderSettlementModeSettledIsHonored() throws Exception {
doTestSenderSettlementModeIsHonored(SenderSettleMode.SETTLED);
}
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSenderSettlementModeUnsettledIsHonored() throws Exception {
doTestSenderSettlementModeIsHonored(SenderSettleMode.UNSETTLED);
}
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSenderSettlementModeMixedIsHonored() throws Exception {
doTestSenderSettlementModeIsHonored(SenderSettleMode.MIXED);
}
@ -125,13 +125,13 @@ public class AmqpSenderTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReceiverSettlementModeSetToFirst() throws Exception {
doTestReceiverSettlementModeForcedToFirst(ReceiverSettleMode.FIRST);
}
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReceiverSettlementModeSetToSecond() throws Exception {
doTestReceiverSettlementModeForcedToFirst(ReceiverSettleMode.SECOND);
}
@ -160,7 +160,7 @@ public class AmqpSenderTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testUnsettledSender() throws Exception {
final int MSG_COUNT = 1000;
@ -201,7 +201,7 @@ public class AmqpSenderTest extends AmqpClientTestSupport {
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMixDurableAndNonDurable() throws Exception {
final int MSG_COUNT = 2000;
@ -236,7 +236,7 @@ public class AmqpSenderTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testPresettledSender() throws Exception {
final int MSG_COUNT = 1000;
@ -261,7 +261,7 @@ public class AmqpSenderTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testDuplicateDetection() throws Exception {
final int MSG_COUNT = 10;
@ -290,7 +290,7 @@ public class AmqpSenderTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testDuplicateDetectionRollback() throws Exception {
ConnectionFactory factory = CFUtil.createConnectionFactory("AMQP", "tcp://localhost:5672");
@ -333,7 +333,7 @@ public class AmqpSenderTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSenderCreditReplenishment() throws Exception {
AtomicInteger counter = new AtomicInteger();
CountDownLatch initialCredit = new CountDownLatch(1);

View File

@ -21,7 +21,6 @@ import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.lang.invoke.MethodHandles;
import java.util.concurrent.TimeUnit;
import org.apache.activemq.artemis.core.server.ServerSession;
import org.apache.activemq.artemis.core.server.impl.ServerSessionImpl;
@ -42,7 +41,7 @@ public class AmqpSessionTest extends AmqpClientTestSupport {
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCreateSession() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -52,7 +51,7 @@ public class AmqpSessionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSessionClosedDoesNotGetReceiverDetachFromRemote() throws Exception {
AmqpClient client = createAmqpClient();
assertNotNull(client);
@ -90,7 +89,7 @@ public class AmqpSessionTest extends AmqpClientTestSupport {
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCreateSessionProducerConsumerDoesNotLeakClosable() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());

View File

@ -52,13 +52,13 @@ public class AmqpTempDestinationTest extends AmqpClientTestSupport {
protected static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCreateDynamicSenderToTopic() throws Exception {
doTestCreateDynamicSender(true);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCreateDynamicSenderToQueue() throws Exception {
doTestCreateDynamicSender(false);
}
@ -91,13 +91,13 @@ public class AmqpTempDestinationTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testDynamicSenderLifetimeBoundToLinkTopic() throws Exception {
doTestDynamicSenderLifetimeBoundToLinkQueue(true);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testDynamicSenderLifetimeBoundToLinkQueue() throws Exception {
doTestDynamicSenderLifetimeBoundToLinkQueue(false);
}
@ -125,13 +125,13 @@ public class AmqpTempDestinationTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCreateDynamicReceiverToTopic() throws Exception {
doTestCreateDynamicSender(true);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCreateDynamicReceiverToQueue() throws Exception {
doTestCreateDynamicSender(false);
}
@ -164,13 +164,13 @@ public class AmqpTempDestinationTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testDynamicReceiverLifetimeBoundToLinkTopic() throws Exception {
doTestDynamicReceiverLifetimeBoundToLinkQueue(true);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testDynamicReceiverLifetimeBoundToLinkQueue() throws Exception {
doTestDynamicReceiverLifetimeBoundToLinkQueue(false);
}
@ -198,13 +198,13 @@ public class AmqpTempDestinationTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void TestCreateDynamicQueueSenderAndPublish() throws Exception {
doTestCreateDynamicSenderAndPublish(false);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void TestCreateDynamicTopicSenderAndPublish() throws Exception {
doTestCreateDynamicSenderAndPublish(true);
}
@ -249,13 +249,13 @@ public class AmqpTempDestinationTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCreateDynamicReceiverToTopicAndSend() throws Exception {
doTestCreateDynamicSender(true);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCreateDynamicReceiverToQueueAndSend() throws Exception {
doTestCreateDynamicSender(false);
}

View File

@ -65,7 +65,7 @@ public class AmqpTransactionTest extends AmqpClientTestSupport {
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testBeginAndCommitTransaction() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -80,7 +80,7 @@ public class AmqpTransactionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testCoordinatorReplenishesCredit() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -97,7 +97,7 @@ public class AmqpTransactionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testSentTransactionalMessageIsSettleWithTransactionalDisposition() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -137,7 +137,7 @@ public class AmqpTransactionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testBeginAndRollbackTransaction() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -154,7 +154,7 @@ public class AmqpTransactionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendMessageToQueueWithCommit() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -180,7 +180,7 @@ public class AmqpTransactionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendMessageToQueueWithRollback() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -206,7 +206,7 @@ public class AmqpTransactionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReceiveMessageWithCommit() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -239,7 +239,7 @@ public class AmqpTransactionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReceiveAfterConnectionClose() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -284,7 +284,7 @@ public class AmqpTransactionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReceiveMessageWithRollback() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -317,7 +317,7 @@ public class AmqpTransactionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMultipleSessionReceiversInSingleTXNWithCommit() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -375,7 +375,7 @@ public class AmqpTransactionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMultipleSessionReceiversInSingleTXNWithRollback() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -433,7 +433,7 @@ public class AmqpTransactionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMultipleSessionSendersInSingleTXNWithCommit() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -474,7 +474,7 @@ public class AmqpTransactionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMultipleSessionSendersInSingleTXNWithRollback() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -517,7 +517,7 @@ public class AmqpTransactionTest extends AmqpClientTestSupport {
//----- Tests Ported from AmqpNetLite client -----------------------------//
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendersCommitAndRollbackWithMultipleSessionsInSingleTX() throws Exception {
final int NUM_MESSAGES = 5;
@ -571,7 +571,7 @@ public class AmqpTransactionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReceiversCommitAndRollbackWithMultipleSessionsInSingleTX() throws Exception {
final int NUM_MESSAGES = 10;
@ -640,7 +640,7 @@ public class AmqpTransactionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCommitAndRollbackWithMultipleSessionsInSingleTX() throws Exception {
final int NUM_MESSAGES = 10;
@ -710,7 +710,7 @@ public class AmqpTransactionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReceiversCommitAndRollbackWithMultipleSessionsInSingleTXNoSettlement() throws Exception {
final int NUM_MESSAGES = 10;
@ -800,7 +800,7 @@ public class AmqpTransactionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCommitAndRollbackWithMultipleSessionsInSingleTXNoSettlement() throws Exception {
final int NUM_MESSAGES = 10;
@ -877,7 +877,7 @@ public class AmqpTransactionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testSendPersistentTX() throws Exception {
int MESSAGE_COUNT = 2000;
AtomicInteger errors = new AtomicInteger(0);
@ -950,7 +950,7 @@ public class AmqpTransactionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testUnsettledTXMessageGetTransactedDispostion() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());

View File

@ -101,7 +101,7 @@ public class AutoCreateWithDefaultRoutingTypesTest extends JMSClientTestSupport
}
@TestTemplate
@Timeout(value = 30_000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testCreateSender() throws Exception {
final String addressName = getTestName();
@ -133,7 +133,7 @@ public class AutoCreateWithDefaultRoutingTypesTest extends JMSClientTestSupport
}
@TestTemplate
@Timeout(value = 30_000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testCreateReceiver() throws Exception {
final String addressName = getTestName();
@ -165,13 +165,13 @@ public class AutoCreateWithDefaultRoutingTypesTest extends JMSClientTestSupport
}
@TestTemplate
@Timeout(value = 30_000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testCreateSenderThatRequestsMultiCast() throws Exception {
dotestCreateSenderThatRequestsSpecificRoutingType(RoutingType.MULTICAST);
}
@TestTemplate
@Timeout(value = 30_000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testCreateSenderThatRequestsAnyCast() throws Exception {
dotestCreateSenderThatRequestsSpecificRoutingType(RoutingType.ANYCAST);
}
@ -215,13 +215,13 @@ public class AutoCreateWithDefaultRoutingTypesTest extends JMSClientTestSupport
}
@TestTemplate
@Timeout(value = 30_000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testCreateReceiverThatRequestsMultiCast() throws Exception {
dotestCreateReceiverThatRequestsSpecificRoutingType(RoutingType.MULTICAST);
}
@TestTemplate
@Timeout(value = 30_000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testCreateReceiverThatRequestsAnyCast() throws Exception {
dotestCreateReceiverThatRequestsSpecificRoutingType(RoutingType.ANYCAST);
}
@ -265,13 +265,13 @@ public class AutoCreateWithDefaultRoutingTypesTest extends JMSClientTestSupport
}
@TestTemplate
@Timeout(value = 30_000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testCreateSenderThatRequestsMultiCastViaPrefix() throws Exception {
dotestCreateSenderThatRequestsSpecificRoutingTypeViaPrefix(RoutingType.MULTICAST);
}
@TestTemplate
@Timeout(value = 30_000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testCreateSenderThatRequestsAnyCastViaPrefix() throws Exception {
dotestCreateSenderThatRequestsSpecificRoutingTypeViaPrefix(RoutingType.ANYCAST);
}
@ -315,13 +315,13 @@ public class AutoCreateWithDefaultRoutingTypesTest extends JMSClientTestSupport
}
@TestTemplate
@Timeout(value = 30_000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testCreateReceiverThatRequestsMultiCastViaPrefix() throws Exception {
dotestCreateReceiverThatRequestsSpecificRoutingTypeViaPrefix(RoutingType.MULTICAST);
}
@TestTemplate
@Timeout(value = 30_000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testCreateReceiverThatRequestsAnyCastViaPrefix() throws Exception {
dotestCreateReceiverThatRequestsSpecificRoutingTypeViaPrefix(RoutingType.ANYCAST);
}

View File

@ -51,7 +51,7 @@ public class BrokerDefinedAnycastConsumerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testConsumeFromSingleQueueOnAddressSameName() throws Exception {
server.addAddressInfo(new AddressInfo(address, RoutingType.ANYCAST));
server.createQueue(new QueueConfiguration(address).setRoutingType(RoutingType.ANYCAST));
@ -73,7 +73,7 @@ public class BrokerDefinedAnycastConsumerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testConsumeFromSingleQueueOnAddressSameNameMultipleQueues() throws Exception {
server.addAddressInfo(new AddressInfo(address, RoutingType.ANYCAST));
server.createQueue(new QueueConfiguration(queue1).setAddress(address).setRoutingType(RoutingType.ANYCAST));
@ -96,7 +96,7 @@ public class BrokerDefinedAnycastConsumerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testConsumeFromSingleQueueOnAddressDifferentName() throws Exception {
server.addAddressInfo(new AddressInfo(address, RoutingType.ANYCAST));
server.createQueue(new QueueConfiguration(queue1).setAddress(address).setRoutingType(RoutingType.ANYCAST));
@ -118,7 +118,7 @@ public class BrokerDefinedAnycastConsumerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testConsumeFromSingleQueueOnAddressDifferentNameMultipleQueues() throws Exception {
server.addAddressInfo(new AddressInfo(address, RoutingType.ANYCAST));
server.createQueue(new QueueConfiguration(queue1).setAddress(address).setRoutingType(RoutingType.ANYCAST));
@ -141,7 +141,7 @@ public class BrokerDefinedAnycastConsumerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testConsumeFromSingleQualifiedQueueOnAddressSameName() throws Exception {
server.addAddressInfo(new AddressInfo(address, RoutingType.ANYCAST));
server.createQueue(new QueueConfiguration(queue1).setAddress(address).setRoutingType(RoutingType.ANYCAST));
@ -163,7 +163,7 @@ public class BrokerDefinedAnycastConsumerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testConsumeWhenOnlyMulticast() throws Exception {
server.addAddressInfo(new AddressInfo(address, RoutingType.MULTICAST));
@ -185,7 +185,7 @@ public class BrokerDefinedAnycastConsumerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testConsumeWhenNoAddressCreatedNoAutoCreate() throws Exception {
AddressSettings settings = new AddressSettings();
settings.setAutoCreateAddresses(false);
@ -203,7 +203,7 @@ public class BrokerDefinedAnycastConsumerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testConsumeWhenNoAddressCreatedAutoCreate() throws Exception {
// This test needs auto-create.. for that just clear the settings and use defaults
server.getAddressSettingsRepository().clear();
@ -224,7 +224,7 @@ public class BrokerDefinedAnycastConsumerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testConsumeWhenNoAddressHasBothRoutingTypesButDefaultQueueIsMultiCast() throws Exception {
AddressInfo addressInfo = new AddressInfo(address);
addressInfo.getRoutingTypes().add(RoutingType.ANYCAST);

View File

@ -55,7 +55,7 @@ public class BrokerDefinedMulticastConsumerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testConsumeFromSingleQueueOnAddressSameName() throws Exception {
server.addAddressInfo(new AddressInfo(address, RoutingType.MULTICAST));
server.createQueue(new QueueConfiguration(address));
@ -77,7 +77,7 @@ public class BrokerDefinedMulticastConsumerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testConsumeWhenOnlyAnycast() throws Exception {
server.addAddressInfo(new AddressInfo(address, RoutingType.ANYCAST));
server.createQueue(new QueueConfiguration(address).setAddress(address).setRoutingType(RoutingType.ANYCAST));
@ -100,7 +100,7 @@ public class BrokerDefinedMulticastConsumerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testConsumeWhenNoAddressHasBothRoutingTypesButDefaultQueueIsAnyCast() throws Exception {
AddressInfo addressInfo = new AddressInfo(address);
addressInfo.getRoutingTypes().add(RoutingType.MULTICAST);

View File

@ -43,7 +43,7 @@ public class ClientDefinedAnycastConsumerTest extends AmqpClientTestSupport {
SimpleString address = new SimpleString("testAddress");
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testConsumeFromSingleQueueOnAddressSameName() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());
@ -65,7 +65,7 @@ public class ClientDefinedAnycastConsumerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testConsumeFromSingleQueueOnAddressSameNameNegativeValidation() throws Exception {
AmqpClient client = createAmqpClient();
AmqpConnection connection = addConnection(client.connect());

View File

@ -45,7 +45,7 @@ public class ClientDefinedMultiConsumerTest extends AmqpClientTestSupport {
SimpleString address = new SimpleString("testAddress");
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void test2ConsumersOnSharedVolatileAddress() throws Exception {
AddressInfo addressInfo = new AddressInfo(address);
addressInfo.getRoutingTypes().add(RoutingType.MULTICAST);
@ -79,7 +79,7 @@ public class ClientDefinedMultiConsumerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void test2ConsumersOnSharedVolatileAddressBrokerDefined() throws Exception {
AddressInfo addressInfo = new AddressInfo(address);
addressInfo.getRoutingTypes().add(RoutingType.MULTICAST);
@ -109,7 +109,7 @@ public class ClientDefinedMultiConsumerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void test2ConsumersOnSharedVolatileAddressNoReceiverClose() throws Exception {
AddressInfo addressInfo = new AddressInfo(address);
addressInfo.getRoutingTypes().add(RoutingType.MULTICAST);
@ -141,7 +141,7 @@ public class ClientDefinedMultiConsumerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void test2ConsumersOnSharedVolatileAddressGlobal() throws Exception {
AddressInfo addressInfo = new AddressInfo(address);
addressInfo.getRoutingTypes().add(RoutingType.MULTICAST);
@ -175,7 +175,7 @@ public class ClientDefinedMultiConsumerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void test2ConsumersOnSharedDurableAddress() throws Exception {
AddressInfo addressInfo = new AddressInfo(address);
addressInfo.getRoutingTypes().add(RoutingType.MULTICAST);
@ -204,7 +204,7 @@ public class ClientDefinedMultiConsumerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void test2ConsumersOnSharedDurableAddressReconnect() throws Exception {
AddressInfo addressInfo = new AddressInfo(address);
addressInfo.getRoutingTypes().add(RoutingType.MULTICAST);
@ -243,7 +243,7 @@ public class ClientDefinedMultiConsumerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void test2ConsumersOnSharedDurableAddressReconnectwithNull() throws Exception {
AddressInfo addressInfo = new AddressInfo(address);
addressInfo.getRoutingTypes().add(RoutingType.MULTICAST);
@ -282,7 +282,7 @@ public class ClientDefinedMultiConsumerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void test2ConsumersOnSharedDurableAddressGlobal() throws Exception {
AddressInfo addressInfo = new AddressInfo(address);
addressInfo.getRoutingTypes().add(RoutingType.MULTICAST);
@ -311,7 +311,7 @@ public class ClientDefinedMultiConsumerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void test2ConsumersOnNonSharedDurableAddress() throws Exception {
AddressInfo addressInfo = new AddressInfo(address);
addressInfo.getRoutingTypes().add(RoutingType.MULTICAST);
@ -336,7 +336,7 @@ public class ClientDefinedMultiConsumerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testAddressDoesntExist() throws Exception {
AmqpClient client = createAmqpClient();

View File

@ -26,7 +26,6 @@ import javax.jms.Message;
import javax.jms.Queue;
import javax.jms.Session;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.LongAdder;
@ -39,7 +38,7 @@ public class DrainTimeoutTest extends AmqpClientTestSupport {
final int NUMBER_OF_MESSAGES = 1000;
@Test
@Timeout(value = 300_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testFlowControl() throws Exception {
final AtomicInteger errors = new AtomicInteger(0);
final String queueName = getQueueName();

View File

@ -28,7 +28,6 @@ import javax.jms.Session;
import javax.jms.TextMessage;
import java.util.Arrays;
import java.util.Collection;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
@ -70,7 +69,7 @@ public class ExtremeCancelsTest extends JMSClientTestSupport {
@TestTemplate
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testLotsOfCloseOpenConsumer() throws Exception {
server.createQueue(new QueueConfiguration(anycastAddress).setRoutingType(RoutingType.ANYCAST));

View File

@ -22,7 +22,6 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.concurrent.TimeUnit;
import javax.jms.Connection;
import javax.jms.Message;
@ -42,7 +41,7 @@ public class JMSAcknowledgeTest extends JMSClientTestSupport {
private static final int INDIVIDUAL_ACK = 101;
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testConsumeIndividualMessagesOutOfOrder() throws Throwable {
Connection connection = createConnection();

View File

@ -37,7 +37,7 @@ import org.junit.jupiter.api.Timeout;
public class JMSConnectionTest extends JMSClientTestSupport {
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testConnection() throws Exception {
Connection connection = createConnection();
@ -63,7 +63,7 @@ public class JMSConnectionTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testClientIDsAreExclusive() throws Exception {
Connection testConn1 = createConnection(false);
Connection testConn2 = createConnection(false);
@ -100,7 +100,7 @@ public class JMSConnectionTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testParallelConnections() throws Exception {
final int numThreads = 40;
ExecutorService executorService = Executors.newFixedThreadPool(numThreads);

View File

@ -39,7 +39,6 @@ import org.slf4j.LoggerFactory;
import java.lang.invoke.MethodHandles;
import java.net.URI;
import java.util.concurrent.TimeUnit;
public class JMSConnectionWithSecurityTest extends JMSClientTestSupport {
@ -56,7 +55,7 @@ public class JMSConnectionWithSecurityTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 10000, unit = TimeUnit.MILLISECONDS)
@Timeout(10)
public void testNoUserOrPassword() throws Exception {
Connection connection = null;
try {
@ -74,7 +73,7 @@ public class JMSConnectionWithSecurityTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 10000, unit = TimeUnit.MILLISECONDS)
@Timeout(10)
public void testNoUserOrPasswordWithoutSaslRestrictions() throws Exception {
Connection connection = null;
JmsConnectionFactory factory = new JmsConnectionFactory(new URI("amqp://localhost:" + AMQP_PORT));
@ -94,7 +93,7 @@ public class JMSConnectionWithSecurityTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 10000, unit = TimeUnit.MILLISECONDS)
@Timeout(10)
public void testUnknownUser() throws Exception {
Connection connection = null;
try {
@ -111,7 +110,7 @@ public class JMSConnectionWithSecurityTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 10000, unit = TimeUnit.MILLISECONDS)
@Timeout(10)
public void testKnownUserWrongPassword() throws Exception {
Connection connection = null;
try {
@ -128,7 +127,7 @@ public class JMSConnectionWithSecurityTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testRepeatedWrongPasswordAttempts() throws Exception {
for (int i = 0; i < 25; ++i) {
Connection connection = null;
@ -147,7 +146,7 @@ public class JMSConnectionWithSecurityTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testSendReceive() throws Exception {
Connection connection = createConnection(fullUser, fullPass);
@ -175,7 +174,7 @@ public class JMSConnectionWithSecurityTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testConsumerNotAuthorized() throws Exception {
Connection connection = createConnection(noprivUser, noprivPass);
@ -194,7 +193,7 @@ public class JMSConnectionWithSecurityTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testBrowserNotAuthorized() throws Exception {
Connection connection = createConnection(noprivUser, noprivPass);
@ -215,7 +214,7 @@ public class JMSConnectionWithSecurityTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testConsumerNotAuthorizedToCreateQueues() throws Exception {
Connection connection = createConnection(noprivUser, noprivPass);
@ -234,7 +233,7 @@ public class JMSConnectionWithSecurityTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testProducerNotAuthorized() throws Exception {
Connection connection = createConnection(guestUser, guestPass);
@ -253,7 +252,7 @@ public class JMSConnectionWithSecurityTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testAnonymousProducerNotAuthorized() throws Exception {
Connection connection = createConnection(guestUser, guestPass);
@ -274,7 +273,7 @@ public class JMSConnectionWithSecurityTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testCreateTemporaryQueueNotAuthorized() throws JMSException {
Connection connection = createConnection(guestUser, guestPass);
@ -295,7 +294,7 @@ public class JMSConnectionWithSecurityTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testCreateTemporaryTopicNotAuthorized() throws JMSException {
Connection connection = createConnection(guestUser, guestPass);

View File

@ -72,7 +72,7 @@ public class JMSDurableConsumerTest extends JMSClientTestSupport {
}
@TestTemplate
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testDurableConsumerAsync() throws Exception {
final CountDownLatch latch = new CountDownLatch(1);
final AtomicReference<Message> received = new AtomicReference<>();
@ -110,7 +110,7 @@ public class JMSDurableConsumerTest extends JMSClientTestSupport {
}
@TestTemplate
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testDurableConsumerSync() throws Exception {
String durableClientId = getTopicName() + "-ClientId";
@ -145,7 +145,7 @@ public class JMSDurableConsumerTest extends JMSClientTestSupport {
}
@TestTemplate
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testDurableConsumerUnsubscribe() throws Exception {
String durableClientId = getTopicName() + "-ClientId";
@ -187,7 +187,7 @@ public class JMSDurableConsumerTest extends JMSClientTestSupport {
}
@TestTemplate
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testDurableConsumerUnsubscribeWhileNoSubscription() throws Exception {
Connection connection = createConnection();
@ -215,7 +215,7 @@ public class JMSDurableConsumerTest extends JMSClientTestSupport {
}
@TestTemplate
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testDurableConsumerUnsubscribeWhileActive() throws Exception {
String durableClientId = getTopicName() + "-ClientId";
@ -241,7 +241,7 @@ public class JMSDurableConsumerTest extends JMSClientTestSupport {
}
@TestTemplate
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testDurableConsumerLarge() throws Exception {
String durableClientId = getTopicName() + "-ClientId";
@ -285,7 +285,7 @@ public class JMSDurableConsumerTest extends JMSClientTestSupport {
}
@TestTemplate
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testDurableConsumerWithSelectorChange() throws Exception {
SimpleString qName = new SimpleString("foo.SharedConsumer");
Connection connection = createConnection("foo", true);

View File

@ -61,13 +61,13 @@ public class JMSMessageConsumerTest extends JMSClientTestSupport {
protected static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSelectorOnTopic() throws Exception {
doTestSelector(true);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSelectorOnQueue() throws Exception {
doTestSelector(false);
}
@ -107,13 +107,13 @@ public class JMSMessageConsumerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testSelectorsWithJMSTypeOnTopic() throws Exception {
doTestSelectorsWithJMSType(true);
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testSelectorsWithJMSTypeOnQueue() throws Exception {
doTestSelectorsWithJMSType(false);
}
@ -156,7 +156,7 @@ public class JMSMessageConsumerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testSelectorsWithJMSCorrelationID() throws Exception {
Connection connection = createConnection();
@ -199,7 +199,7 @@ public class JMSMessageConsumerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testSelectorsWithJMSPriority() throws Exception {
Connection connection = createConnection();
@ -238,13 +238,13 @@ public class JMSMessageConsumerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testSelectorsWithJMSXGroupIDOnTopic() throws Exception {
doTestSelectorsWithJMSXGroupID(true);
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testSelectorsWithJMSXGroupIDOnQueue() throws Exception {
doTestSelectorsWithJMSXGroupID(false);
}
@ -298,7 +298,7 @@ public class JMSMessageConsumerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testSelectorsWithJMSDeliveryOnQueue() throws Exception {
final Connection connection = createConnection();
@ -332,7 +332,7 @@ public class JMSMessageConsumerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testSelectorsWithJMSTimestampOnQueue() throws Exception {
final Connection connection = createConnection();
@ -368,7 +368,7 @@ public class JMSMessageConsumerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testSelectorsWithJMSExpirationOnQueue() throws Exception {
final Connection connection = createConnection();
@ -401,7 +401,7 @@ public class JMSMessageConsumerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testJMSSelectorFiltersJMSMessageIDOnTopic() throws Exception {
Connection connection = createConnection();
@ -433,7 +433,7 @@ public class JMSMessageConsumerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testZeroPrefetchWithTwoConsumers() throws Exception {
JmsConnection connection = (JmsConnection) createConnection();
((JmsDefaultPrefetchPolicy) connection.getPrefetchPolicy()).setAll(0);
@ -461,25 +461,25 @@ public class JMSMessageConsumerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testProduceAndConsumeLargeNumbersOfTopicMessagesClientAck() throws Exception {
doTestProduceAndConsumeLargeNumbersOfMessages(true, Session.CLIENT_ACKNOWLEDGE);
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testProduceAndConsumeLargeNumbersOfQueueMessagesClientAck() throws Exception {
doTestProduceAndConsumeLargeNumbersOfMessages(false, Session.CLIENT_ACKNOWLEDGE);
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testProduceAndConsumeLargeNumbersOfTopicMessagesAutoAck() throws Exception {
doTestProduceAndConsumeLargeNumbersOfMessages(true, Session.AUTO_ACKNOWLEDGE);
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testProduceAndConsumeLargeNumbersOfQueueMessagesAutoAck() throws Exception {
doTestProduceAndConsumeLargeNumbersOfMessages(false, Session.AUTO_ACKNOWLEDGE);
}
@ -528,7 +528,7 @@ public class JMSMessageConsumerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testPrefetchedMessagesAreNotConsumedOnConsumerClose() throws Exception {
final int NUM_MESSAGES = 10;
@ -569,7 +569,7 @@ public class JMSMessageConsumerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMessagesReceivedInParallel() throws Throwable {
final int numMessages = 50000;
long time = System.currentTimeMillis();
@ -652,7 +652,7 @@ public class JMSMessageConsumerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testClientAckMessages() throws Exception {
final int numMessages = 10;
@ -701,7 +701,7 @@ public class JMSMessageConsumerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testTimedOutWaitingForWriteLogOnConsumer() throws Throwable {
String name = "exampleQueue1";
// disable auto-delete as it causes thrashing during the test
@ -771,7 +771,7 @@ public class JMSMessageConsumerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testBrokerRestartAMQPProducerAMQPConsumer() throws Exception {
Connection connection = createFailoverConnection(); //AMQP
Connection connection2 = createFailoverConnection(); //AMQP

View File

@ -23,7 +23,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.Random;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
import javax.jms.Connection;
import javax.jms.Destination;
@ -43,7 +42,7 @@ import org.junit.jupiter.api.Timeout;
public class JMSMessageProducerTest extends JMSClientTestSupport {
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testAnonymousProducerWithQueueAutoCreation() throws Exception {
Connection connection = createConnection();
@ -73,7 +72,7 @@ public class JMSMessageProducerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testAnonymousProducer() throws Exception {
Connection connection = createConnection();
@ -108,7 +107,7 @@ public class JMSMessageProducerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testAnonymousProducerWithTopicAutoCreation() throws Exception {
Connection connection = createConnection();
@ -143,7 +142,7 @@ public class JMSMessageProducerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testDuplicateDetection() throws Exception {
final int MSG_COUNT = 10;
Connection connection = createConnection();
@ -167,7 +166,7 @@ public class JMSMessageProducerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testAnonymousProducerAcrossManyDestinations() throws Exception {
Connection connection = createConnection();
@ -201,7 +200,7 @@ public class JMSMessageProducerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendingBigMessage() throws Exception {
Connection connection = createConnection();
@ -226,7 +225,7 @@ public class JMSMessageProducerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendWithTimeToLiveExpiresToDLQ() throws Exception {
Connection connection = createConnection();
@ -258,7 +257,7 @@ public class JMSMessageProducerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReplyToUsingQueue() throws Throwable {
Connection connection = createConnection();
@ -286,7 +285,7 @@ public class JMSMessageProducerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReplyToUsingTempQueue() throws Throwable {
Connection connection = createConnection();

View File

@ -50,7 +50,7 @@ public class JMSQueueBrowserTest extends JMSClientTestSupport {
protected static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testBrowseAllInQueueZeroPrefetch() throws Exception {
final int MSG_COUNT = 5;
@ -85,7 +85,7 @@ public class JMSQueueBrowserTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 40000, unit = TimeUnit.MILLISECONDS)
@Timeout(40)
public void testCreateQueueBrowser() throws Exception {
Connection connection = createConnection();
connection.start();
@ -103,7 +103,7 @@ public class JMSQueueBrowserTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 40000, unit = TimeUnit.MILLISECONDS)
@Timeout(40)
public void testNoMessagesBrowserHasNoElements() throws Exception {
Connection connection = createConnection();
connection.start();
@ -124,7 +124,7 @@ public class JMSQueueBrowserTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testBroseOneInQueue() throws Exception {
Connection connection = createConnection();
connection.start();
@ -152,7 +152,7 @@ public class JMSQueueBrowserTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testBrowseAllInQueue() throws Exception {
Connection connection = createConnection();
connection.start();
@ -181,7 +181,7 @@ public class JMSQueueBrowserTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testBrowseAllInQueuePrefetchOne() throws Exception {
Connection connection = createConnection();
connection.start();
@ -209,7 +209,7 @@ public class JMSQueueBrowserTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 40000, unit = TimeUnit.MILLISECONDS)
@Timeout(40)
public void testBrowseAllInQueueTxSession() throws Exception {
Connection connection = createConnection();
connection.start();
@ -237,7 +237,7 @@ public class JMSQueueBrowserTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 40000, unit = TimeUnit.MILLISECONDS)
@Timeout(40)
public void testQueueBrowserInTxSessionLeavesOtherWorkUnaffected() throws Exception {
Connection connection = createConnection();
connection.start();
@ -281,7 +281,7 @@ public class JMSQueueBrowserTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testBrowseAllInQueueSmallPrefetch() throws Exception {
Connection connection = createConnection();
connection.start();

View File

@ -34,7 +34,6 @@ import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.activemq.artemis.api.core.TransportConfiguration;
@ -137,7 +136,7 @@ public class JMSSaslExternalTest extends ActiveMQTestBase {
}
@Test
@Timeout(value = 600000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testConnection() throws Exception {
final String keystore = this.getClass().getClassLoader().getResource("other-client-keystore.jks").getFile();

View File

@ -208,7 +208,7 @@ public class JMSSaslGssapiTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 600000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testConnection() throws Exception {
Connection connection = createConnection("client", null);
connection.start();
@ -231,7 +231,7 @@ public class JMSSaslGssapiTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 600000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSaslPlainConnectionDenied() throws Exception {
JmsConnectionFactory factory = new JmsConnectionFactory(new URI("amqp://localhost:" + AMQP_PORT + "?amqp.saslMechanisms=PLAIN"));
try {
@ -243,7 +243,7 @@ public class JMSSaslGssapiTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 900000, unit = TimeUnit.MILLISECONDS)
@Timeout(90)
public void testOutboundWithSlowMech() throws Exception {
final Map<String, Object> config = new LinkedHashMap<>(); config.put(TransportConstants.HOST_PROP_NAME, "localhost");
config.put(TransportConstants.PORT_PROP_NAME, String.valueOf(AMQP_PORT));

View File

@ -42,7 +42,7 @@ public class JMSTemporaryDestinationTest extends JMSClientTestSupport {
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCreateTemporaryQueue() throws Throwable {
Connection connection = createConnection();
@ -68,7 +68,7 @@ public class JMSTemporaryDestinationTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testDeleteTemporaryQueue() throws Exception {
Connection connection = createConnection();
@ -97,7 +97,7 @@ public class JMSTemporaryDestinationTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCreateTemporaryTopic() throws Throwable {
Connection connection = createConnection();
@ -120,7 +120,7 @@ public class JMSTemporaryDestinationTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testDeleteTemporaryTopic() throws Exception {
Connection connection = createConnection();

View File

@ -54,7 +54,7 @@ import org.junit.jupiter.api.Timeout;
public class JMSTopicConsumerTest extends JMSClientTestSupport {
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendAndReceiveOnTopic() throws Exception {
Connection connection = createConnection("myClientId");
@ -81,7 +81,7 @@ public class JMSTopicConsumerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendAndReceiveOnAutoCreatedTopic() throws Exception {
Connection connection = createConnection("myClientId");
String topicName = UUID.randomUUID().toString();
@ -122,7 +122,7 @@ public class JMSTopicConsumerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendAndReceiveOnAutoCreatedTopicJMS2() throws Exception {
ConnectionFactory cf = new JmsConnectionFactory(getBrokerQpidJMSConnectionURI());
JMSContext context = cf.createContext();
@ -162,7 +162,7 @@ public class JMSTopicConsumerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendWithMultipleReceiversOnTopic() throws Exception {
Connection connection = createConnection();
@ -196,7 +196,7 @@ public class JMSTopicConsumerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testDurableSubscriptionUnsubscribe() throws Exception {
Connection connection = createConnection("myClientId");
@ -223,7 +223,7 @@ public class JMSTopicConsumerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testDurableSharedSubscriptionUnsubscribe() throws Exception {
Connection connection = createConnection("myClientId");
@ -243,7 +243,7 @@ public class JMSTopicConsumerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testDurableMultipleSharedSubscriptionUnsubscribe() throws Exception {
Connection connection = createConnection("myClientId");
@ -272,7 +272,7 @@ public class JMSTopicConsumerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testDurableSharedGlobalSubscriptionUnsubscribe() throws Exception {
Connection connection = createConnection();
@ -292,7 +292,7 @@ public class JMSTopicConsumerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testDurableMultipleSharedGlobalSubscriptionUnsubscribe() throws Exception {
Connection connection = createConnection();
Connection connection2 = createConnection();
@ -320,7 +320,7 @@ public class JMSTopicConsumerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testTemporarySubscriptionDeleted() throws Exception {
Connection connection = createConnection();
@ -352,7 +352,7 @@ public class JMSTopicConsumerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMultipleDurableConsumersSendAndReceive() throws Exception {
Connection connection = createConnection("myClientId");
@ -389,7 +389,7 @@ public class JMSTopicConsumerTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testDurableSubscriptionReconnection() throws Exception {
Connection connection = createConnection("myClientId");

View File

@ -24,7 +24,6 @@ import java.lang.invoke.MethodHandles;
import java.util.HashSet;
import java.util.Random;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import javax.jms.Connection;
import javax.jms.Message;
@ -45,7 +44,7 @@ public class JMSTransactionTest extends JMSClientTestSupport {
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testProduceMessageAndCommit() throws Throwable {
Connection connection = createConnection();
Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
@ -68,7 +67,7 @@ public class JMSTransactionTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testProduceMessageAndRollback() throws Throwable {
Connection connection = createConnection();
Session session = connection.createSession(true, Session.SESSION_TRANSACTED);
@ -90,7 +89,7 @@ public class JMSTransactionTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testProducedMessageAreRolledBackOnSessionClose() throws Exception {
int numMessages = 10;
@ -114,7 +113,7 @@ public class JMSTransactionTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testConsumeMessagesAndCommit() throws Throwable {
Connection connection = createConnection();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
@ -146,7 +145,7 @@ public class JMSTransactionTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testConsumeMessagesAndRollback() throws Throwable {
Connection connection = createConnection();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
@ -177,7 +176,7 @@ public class JMSTransactionTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testRollbackSomeThenReceiveAndCommit() throws Exception {
final int MSG_COUNT = 5;
final int consumeBeforeRollback = 2;

View File

@ -29,7 +29,6 @@ import javax.jms.Session;
import org.apache.activemq.ActiveMQConnectionFactory;
import java.util.concurrent.TimeUnit;
import org.apache.qpid.jms.JmsConnection;
import org.apache.qpid.jms.JmsConnectionFactory;
import org.junit.jupiter.api.Disabled;
@ -47,7 +46,7 @@ public class JMSWebSocketConnectionTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testCreateConnectionAndStart() throws Exception {
JmsConnectionFactory factory = new JmsConnectionFactory(getBrokerQpidJMSConnectionURI());
JmsConnection connection = (JmsConnection) factory.createConnection();
@ -57,7 +56,7 @@ public class JMSWebSocketConnectionTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testSendReceiveOverWS() throws Exception {
JmsConnectionFactory factory = new JmsConnectionFactory(getBrokerQpidJMSConnectionURI());
JmsConnection connection = (JmsConnection) factory.createConnection();
@ -82,7 +81,7 @@ public class JMSWebSocketConnectionTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testSendLargeMessageToClientFromOpenWire() throws Exception {
JmsConnectionFactory factory = new JmsConnectionFactory(getBrokerQpidJMSConnectionURI());
JmsConnection connection = (JmsConnection) factory.createConnection();
@ -106,7 +105,7 @@ public class JMSWebSocketConnectionTest extends JMSClientTestSupport {
@Disabled("Broker can't accept messages over 65535 right now")
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testSendLargeMessageToClientFromAMQP() throws Exception {
JmsConnectionFactory factory = new JmsConnectionFactory(getBrokerQpidJMSConnectionURI());
JmsConnection connection = (JmsConnection) factory.createConnection();

View File

@ -55,7 +55,7 @@ public class PropertyParseOptimizationTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendWithPropertiesAndFilter() throws Exception {
int size = 10 * 1024;
AmqpClient client = createAmqpClient(new URI(noDuplicateAcceptor));

View File

@ -55,7 +55,6 @@ import java.lang.invoke.MethodHandles;
import java.math.BigInteger;
import java.util.Map;
import java.util.Random;
import java.util.concurrent.TimeUnit;
//adapted from https://issues.apache.org/jira/browse/ARTEMIS-1416
public class QueueAutoCreationTest extends JMSClientTestSupport {
@ -112,20 +111,20 @@ public class QueueAutoCreationTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testSmallString() throws Exception {
sendStringOfSize(1024, false);
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testHugeString() throws Exception {
sendStringOfSize(1024 * 1024, false);
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
// QueueAutoCreationTest was created to validate auto-creation of queues
// and this test was added to validate a regression: https://issues.apache.org/jira/browse/ARTEMIS-2238
public void testAutoCreateOnTopic() throws Exception {
@ -145,7 +144,7 @@ public class QueueAutoCreationTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
// QueueAutoCreationTest was created to validate auto-creation of queues
// and this test was added to validate a regression: https://issues.apache.org/jira/browse/ARTEMIS-2238
public void testAutoCreateOnTopicManySends() throws Exception {
@ -167,7 +166,7 @@ public class QueueAutoCreationTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
// QueueAutoCreationTest was created to validate auto-creation of queues
// and this test was added to validate a regression: https://issues.apache.org/jira/browse/ARTEMIS-2238
public void testAutoCreateOnTopicAndConsume() throws Exception {

View File

@ -66,7 +66,7 @@ public class AMQPConnectSaslTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20_000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testConnectsWithAnonymous() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect(PLAIN, ANONYMOUS);
@ -90,7 +90,7 @@ public class AMQPConnectSaslTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20_000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testConnectsWithPlain() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLPlainConnect(USER, PASSWD, PLAIN, ANONYMOUS);
@ -116,13 +116,13 @@ public class AMQPConnectSaslTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20_000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testAnonymousSelectedWhenNoCredentialsSupplied() throws Exception {
doMechanismSelectedTestImpl(null, null, ANONYMOUS, new String[]{SCRAM_SHA_512, PLAIN, ANONYMOUS});
}
@Test
@Timeout(value = 20_000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testSelectsSCRAMWhenCredentialsPresent() throws Exception {
doMechanismSelectedTestImpl(USER, PASSWD, SCRAM_SHA_512, new String[]{SCRAM_SHA_512, PLAIN, ANONYMOUS});
}
@ -154,13 +154,13 @@ public class AMQPConnectSaslTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20_000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testConnectsWithExternal() throws Exception {
doConnectWithExternalTestImpl(true);
}
@Test
@Timeout(value = 20_000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testExternalIgnoredWhenNoClientCertSupplied() throws Exception {
doConnectWithExternalTestImpl(false);
}
@ -225,7 +225,7 @@ public class AMQPConnectSaslTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20_000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testReconnectConnectsWithVerifyHostOffOnSecondURI() throws Exception {
final String keyStorePath = this.getClass().getClassLoader().getResource(UNKNOWN_SERVER_KEYSTORE_NAME).getFile();
@ -287,7 +287,7 @@ public class AMQPConnectSaslTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20_000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testReconnectionUsesConfigurationToReconnectToSecondHostAfterFirstFails() throws Exception {
final String keyStore1Path = this.getClass().getClassLoader().getResource(UNKNOWN_SERVER_KEYSTORE_NAME).getFile();
final String keyStore2Path = this.getClass().getClassLoader().getResource(SERVER_KEYSTORE_NAME).getFile();
@ -348,7 +348,7 @@ public class AMQPConnectSaslTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20_000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testReconnectionUsesHostSpecificConfigurationToReconnectToSecondHostAfterFirstFails() throws Exception {
final String keyStore1Path = this.getClass().getClassLoader().getResource(UNKNOWN_SERVER_KEYSTORE_NAME).getFile();
final String keyStore2Path = this.getClass().getClassLoader().getResource(SERVER_KEYSTORE_NAME).getFile();

View File

@ -155,7 +155,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationCreatesAddressReceiverWhenLocalQueueIsStaticlyDefined() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -252,7 +252,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationCreatesAddressReceiverLinkForAddressMatch() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -326,7 +326,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationCreatesAddressReceiverLinkForAddressMatchUsingPolicyCredit() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -402,13 +402,13 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationCreatesAddressReceiverLinkForAddressMatchWithMaxHopsFilter() throws Exception {
doTestFederationCreatesAddressReceiverLinkForAddressWithCorrectFilters(true);
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationCreatesAddressReceiverLinkForAddressMatchWithoutMaxHopsFilter() throws Exception {
doTestFederationCreatesAddressReceiverLinkForAddressWithCorrectFilters(false);
}
@ -567,7 +567,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationClosesAddressReceiverLinkWhenDemandRemoved() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -647,7 +647,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationRetainsAddressReceiverLinkWhenDurableSubscriberIsOffline() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -734,7 +734,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationClosesAddressReceiverLinkWaitsForAllDemandToRemoved() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -816,7 +816,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationHandlesAddressDeletedAndConsumerRecreates() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -903,7 +903,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationConsumerCreatedWhenDemandAddedToDivertAddress() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -986,7 +986,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationConsumerCreatedWhenDemandAddedToCompositeDivertAddress() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -1077,7 +1077,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationConsumerRemovesDemandFromDivertConsumersOnlyWhenAllDemandIsRemoved() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -1162,7 +1162,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationConsumerRetainsDemandForDivertBindingWithoutActiveAnycastSubscriptions() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -1252,7 +1252,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationConsumerRemovesDemandForDivertBindingWithoutActiveMulticastSubscriptions() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -1344,7 +1344,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationRemovesRemoteDemandIfDivertIsRemoved() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -1427,7 +1427,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testDivertBindingsDoNotCreateAdditionalDemandIfDemandOnForwardingAddressAlreadyExists() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -1521,7 +1521,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testInboundMessageRoutedToReceiverOnLocalAddress() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -1594,7 +1594,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteBrokerAcceptsAddressPolicyFromControlLink() throws Exception {
server.start();
@ -1632,7 +1632,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteBrokerAcceptsAddressPolicyFromControlLinkWithTransformerConfiguration() throws Exception {
server.start();
@ -1678,7 +1678,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteFederatesAddressWhenDemandIsApplied() throws Exception {
server.start();
@ -1742,7 +1742,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteFederatesAddressWhenDemandIsAppliedUsingControllerDefinedLinkCredit() throws Exception {
server.start();
@ -1807,7 +1807,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteFederatesAddressWhenDemandIsAppliedUsingPolicyDefinedLinkCredit() throws Exception {
server.start();
@ -1877,7 +1877,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteFederatesAddressAndAppliesTransformerWhenDemandIsApplied() throws Exception {
server.start();
@ -1951,7 +1951,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteBrokerAnswersAttachOfFederationReceiverProperly() throws Exception {
server.start();
@ -1998,7 +1998,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testReceiverWithMaxHopsFilterAppliesFilterCorrectly() throws Exception {
server.start();
@ -2116,7 +2116,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteConnectionCannotAttachAddressFederationLinkWithoutControlLink() throws Exception {
server.start();
@ -2162,7 +2162,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testTransformInboundFederatedMessageBeforeDispatch() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -2246,7 +2246,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationDoesNotCreateAddressReceiverLinkForAddressMatchWhenLinkCreditIsSetToZero() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -2309,13 +2309,13 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testCoreMessageConvertedToAMQPWhenTunnelingDisabled() throws Exception {
doTestCoreMessageHandlingBasedOnTunnelingState(false);
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testCoreMessageNotConvertedToAMQPWhenTunnelingEnabled() throws Exception {
doTestCoreMessageHandlingBasedOnTunnelingState(true);
}
@ -2388,13 +2388,13 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testCoreLargeMessageConvertedToAMQPWhenTunnelingDisabled() throws Exception {
doTestCoreLargeMessageHandlingBasedOnTunnelingState(false);
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testCoreLargeMessageNotConvertedToAMQPWhenTunnelingEnabled() throws Exception {
doTestCoreLargeMessageHandlingBasedOnTunnelingState(true);
}
@ -2474,7 +2474,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationStartedTriggersRemoteDemandWithExistingAddressBindings() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.start();
@ -2580,7 +2580,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationStartedTriggersRemoteDemandWithExistingAddressAndDivertBindings() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.start();
@ -2689,7 +2689,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationStartTriggersFederationWithMultipleDivertsAndRemainsActiveAfterOneRemoved() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.start();
@ -2810,7 +2810,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationPluginCanLimitDemandToOnlyTheConfiguredDivert() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -2908,7 +2908,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationCreatesEventSenderAndReceiverWhenLocalAndRemotePoliciesAdded() throws Exception {
final MessageAnnotationsMatcher maMatcher = new MessageAnnotationsMatcher(true);
maMatcher.withEntry(OPERATION_TYPE.toString(), Matchers.is(ADD_ADDRESS_POLICY));
@ -2994,7 +2994,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationSendsRemotePolicyIfEventsSenderLinkRejected() throws Exception {
final MessageAnnotationsMatcher maMatcher = new MessageAnnotationsMatcher(true);
maMatcher.withEntry(OPERATION_TYPE.toString(), Matchers.is(ADD_ADDRESS_POLICY));
@ -3064,7 +3064,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteBrokerSendsAddressAddedEventForInterestedPeer() throws Exception {
final AddressSettings addressSettings = new AddressSettings();
addressSettings.setAutoCreateQueues(false);
@ -3135,7 +3135,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationCreatesAddressReceiverInResponseToAddressAddedEvent() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -3233,7 +3233,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testAddressAddedEventIgnoredIfFederationConsumerAlreadyCreated() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -3313,7 +3313,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteBrokerClosesFederationReceiverAfterAddressRemoved() throws Exception {
server.start();
server.addAddressInfo(new AddressInfo(SimpleString.toSimpleString("test"), RoutingType.MULTICAST));
@ -3384,7 +3384,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationAddressDemandTrackedWhenRemoteRejectsInitialAttempts() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -3486,7 +3486,7 @@ public class AMQPFederationAddressPolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationAddressDemandTrackedWhenPluginBlocksInitialAttempts() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();

View File

@ -22,7 +22,6 @@ import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertSame;
import java.lang.invoke.MethodHandles;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.BiConsumer;
@ -104,7 +103,7 @@ public class AMQPFederationBrokerPliuginTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationBrokerPluginWithAddressPolicyConfigured() throws Exception {
logger.info("Test started: {}", getTestName());
@ -191,7 +190,7 @@ public class AMQPFederationBrokerPliuginTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationBrokerPluginWithQueuePolicyConfigured() throws Exception {
logger.info("Test started: {}", getTestName());
@ -277,7 +276,7 @@ public class AMQPFederationBrokerPliuginTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testPluginCanBlockAddressFederationConsumerCreate() throws Exception {
logger.info("Test started: {}", getTestName());
@ -349,7 +348,7 @@ public class AMQPFederationBrokerPliuginTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testPluginCanBlockQueueFederationConsumerCreate() throws Exception {
logger.info("Test started: {}", getTestName());
@ -421,7 +420,7 @@ public class AMQPFederationBrokerPliuginTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testPluginCanBlockAddressFederationWhenDemandOnDivertIsAdded() throws Exception {
logger.info("Test started: {}", getTestName());

View File

@ -94,7 +94,7 @@ public class AMQPFederationConfigurationReloadTest extends AmqpClientTestSupport
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationConfigurationWithoutChangesIsIgnoredOnUpdate() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -193,7 +193,7 @@ public class AMQPFederationConfigurationReloadTest extends AmqpClientTestSupport
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationConnectsToSecondPeerWhenConfigurationUpdatedWithNewConnection() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
@ -320,7 +320,7 @@ public class AMQPFederationConfigurationReloadTest extends AmqpClientTestSupport
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationDisconnectsFromExistingPeerIfConfigurationRemoved() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
@ -410,7 +410,7 @@ public class AMQPFederationConfigurationReloadTest extends AmqpClientTestSupport
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationUpdatesPolicyAndFederatesQueueInsteadOfAddress() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
@ -538,7 +538,7 @@ public class AMQPFederationConfigurationReloadTest extends AmqpClientTestSupport
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testReloadAmqpConnectionAddressPolicyMatches() throws Exception {
server.start();
@ -614,7 +614,7 @@ public class AMQPFederationConfigurationReloadTest extends AmqpClientTestSupport
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testReloadAmqpConnectionQueuePolicyMatches() throws Exception {
server.start();
server.createQueue(new QueueConfiguration("queue1").setRoutingType(RoutingType.ANYCAST)
@ -704,7 +704,7 @@ public class AMQPFederationConfigurationReloadTest extends AmqpClientTestSupport
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testReloadAmqpConnectionAddressPolicyReplacedWithQueuePolicy() throws Exception {
server.start();
server.createQueue(new QueueConfiguration("queue1").setRoutingType(RoutingType.ANYCAST)
@ -778,7 +778,7 @@ public class AMQPFederationConfigurationReloadTest extends AmqpClientTestSupport
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testReloadAmqpConnectionQueuePolicyMatchesFromBrokerProperties() throws Exception {
server.start();
server.createQueue(new QueueConfiguration("queue1").setRoutingType(RoutingType.ANYCAST)

View File

@ -105,7 +105,7 @@ public class AMQPFederationConnectTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testBrokerConnectsWithAnonymous() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect("PLAIN", "ANONYMOUS");
@ -128,7 +128,7 @@ public class AMQPFederationConnectTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederatedBrokerConnectsWithPlain() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLPlainConnect("user", "pass", "PLAIN", "ANONYMOUS");
@ -152,7 +152,7 @@ public class AMQPFederationConnectTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationConfiguredCreatesControlLink() throws Exception {
final int AMQP_MIN_LARGE_MESSAGE_SIZE = 10_000;
final int AMQP_CREDITS = 100;
@ -217,7 +217,7 @@ public class AMQPFederationConnectTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationCreatesControlLinkAndClosesConnectionIfCapabilityIsAbsent() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect("PLAIN", "ANONYMOUS");
@ -243,7 +243,7 @@ public class AMQPFederationConnectTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationCreatesControlLinkAndClosesConnectionDetachIndicatesNotAuthorized() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect("PLAIN", "ANONYMOUS");
@ -288,7 +288,7 @@ public class AMQPFederationConnectTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationSendsReceiveFromQueuePolicyToRemoteWhenSendToIsConfigured() throws Exception {
final MessageAnnotationsMatcher maMatcher = new MessageAnnotationsMatcher(true);
maMatcher.withEntry(OPERATION_TYPE.toString(), Matchers.is(ADD_QUEUE_POLICY));
@ -363,7 +363,7 @@ public class AMQPFederationConnectTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationSendsReceiveFromQueuePolicyToRemoteWhenSendToIsConfiguredAndEventSenderRejected() throws Exception {
final MessageAnnotationsMatcher maMatcher = new MessageAnnotationsMatcher(true);
maMatcher.withEntry(OPERATION_TYPE.toString(), Matchers.is(ADD_QUEUE_POLICY));
@ -439,7 +439,7 @@ public class AMQPFederationConnectTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationSendsReceiveFromAddressPolicyToRemoteWhenSendToIsConfigured() throws Exception {
final MessageAnnotationsMatcher maMatcher = new MessageAnnotationsMatcher(true);
maMatcher.withEntry(OPERATION_TYPE.toString(), Matchers.is(ADD_ADDRESS_POLICY));
@ -512,7 +512,7 @@ public class AMQPFederationConnectTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationSendsReceiveFromAddressPolicyToRemoteWhenSendToIsConfiguredAndEventSenderRejected() throws Exception {
final MessageAnnotationsMatcher maMatcher = new MessageAnnotationsMatcher(true);
maMatcher.withEntry(OPERATION_TYPE.toString(), Matchers.is(ADD_ADDRESS_POLICY));
@ -586,7 +586,7 @@ public class AMQPFederationConnectTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testConnectToBrokerFromRemoteAsFederatedSourceAndCreateControlLink() throws Exception {
server.start();
@ -608,7 +608,7 @@ public class AMQPFederationConnectTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testConnectToBrokerFromRemoteAsFederatedSourceAndCreateEventsSenderLink() throws Exception {
server.start();
@ -630,7 +630,7 @@ public class AMQPFederationConnectTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testConnectToBrokerFromRemoteAsFederatedSourceAndCreateEventsReceiverLink() throws Exception {
server.start();
@ -652,7 +652,7 @@ public class AMQPFederationConnectTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testConnectToBrokerFromRemoteAsFederatedSourceAndCreateEventsLinks() throws Exception {
server.start();
@ -674,7 +674,7 @@ public class AMQPFederationConnectTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testControlLinkPassesConnectAttemptWhenUserHasPrivledges() throws Exception {
enableSecurity(server, FEDERATION_BASE_VALIDATION_ADDRESS);
server.start();
@ -697,7 +697,7 @@ public class AMQPFederationConnectTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testControlAndEventsLinksPassesConnectAttemptWhenUserHasPrivledges() throws Exception {
enableSecurity(server, FEDERATION_BASE_VALIDATION_ADDRESS + ".#");
server.start();
@ -720,7 +720,7 @@ public class AMQPFederationConnectTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testControlLinkRefusesConnectAttemptWhenUseDoesNotHavePrivledgesForControlAddress() throws Exception {
enableSecurity(server, FEDERATION_BASE_VALIDATION_ADDRESS);
server.start();
@ -739,7 +739,7 @@ public class AMQPFederationConnectTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteConnectionCannotAttachEventReceiverLinkWithoutControlLink() throws Exception {
server.start();
@ -785,7 +785,7 @@ public class AMQPFederationConnectTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteConnectionCannotAttachEventSenderLinkWithoutControlLink() throws Exception {
server.start();
@ -831,7 +831,7 @@ public class AMQPFederationConnectTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testControlLinkSenderQueueCreatedWithMaxConsumersOfOne() throws Exception {
final String controlLinkAddress = "test-control-address";
final String federationControlSenderAddress = FEDERATION_BASE_VALIDATION_ADDRESS +
@ -891,7 +891,7 @@ public class AMQPFederationConnectTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testEventSenderLinkFromTargetUsesNamespacedDynamicQueue() throws Exception {
final String federationControlLinkName = "federation-test";
@ -961,7 +961,7 @@ public class AMQPFederationConnectTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testEventsLinkAtTargetIsCreatedWithMaxConsumersOfOne() throws Exception {
final String federationControlLinkName = "federation-test";
@ -1050,7 +1050,7 @@ public class AMQPFederationConnectTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 30_000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testFederationDemandAddedAndImmediateBrokerShutdownOverlaps() throws Exception {
// Testing for a race on broker shutdown if demand was added at the same time and the
// broker is creating an outbound consumer to match that demand.

View File

@ -149,13 +149,13 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationCreatesQueueReceiverLinkForQueueMatchAnycast() throws Exception {
doTestFederationCreatesQueueReceiverLinkForQueueMatch(RoutingType.ANYCAST);
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationCreatesQueueReceiverLinkForQueueMatchMulticast() throws Exception {
doTestFederationCreatesQueueReceiverLinkForQueueMatch(RoutingType.MULTICAST);
}
@ -230,7 +230,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationQueueReceiverCarriesConfiguredQueueFilter() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -297,7 +297,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationQueueReceiverCarriesConsumerQueueFilter() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -401,7 +401,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationQueueReceiverCanIgnoreConsumerQueueFilter() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -473,7 +473,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationCreatesQueueReceiverLinkForQueueMatchUsingPolicyCredit() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -542,7 +542,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationClosesQueueReceiverWhenDemandIsRemovedFromQueue() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -607,7 +607,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationHandlesQueueDeletedAndConsumerRecreates() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -696,7 +696,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testSecondQueueConsumerDoesNotGenerateAdditionalFederationReceiver() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -762,7 +762,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testLinkCreatedForEachDistinctQueueMatchInSameConfiguredPolicy() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -844,7 +844,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationReceiverCreatedWhenWildcardPolicyMatchesConsumerQueue() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -909,7 +909,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteCloseOfQueueReceiverRespondsToDetach() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -977,7 +977,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRejectedQueueReceiverAttachWhenLocalMatchingQueueNotFoundIsHandled() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -1062,13 +1062,13 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteCloseQueueReceiverWhenRemoteResourceIsDeletedIsHandled() throws Exception {
doTestRemoteCloseQueueReceiverForExpectedConditionsIsHandled("amqp:resource-deleted");
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteCloseQueueReceiverWhenRemoteReceiverIsForcedToDetachIsHandled() throws Exception {
doTestRemoteCloseQueueReceiverForExpectedConditionsIsHandled("amqp:link:detach-forced");
}
@ -1155,7 +1155,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testUnhandledRemoteReceiverCloseConditionCausesConnectionRebuild() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -1251,7 +1251,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testInboundMessageRoutedToReceiverOnLocalQueue() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -1328,19 +1328,19 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationCreatesQueueReceiverLinkWithDefaultPrioirty() throws Exception {
doTestFederationCreatesQueueReceiverLinkWithAdjustedPriority(0);
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationCreatesQueueReceiverLinkWithIncreasedPriority() throws Exception {
doTestFederationCreatesQueueReceiverLinkWithAdjustedPriority(5);
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationCreatesQueueReceiverLinkWithDecreasedPriority() throws Exception {
doTestFederationCreatesQueueReceiverLinkWithAdjustedPriority(-5);
}
@ -1411,13 +1411,13 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationCreatesQueueReceiverLinkConsumerPriorityOffset() throws Exception {
doTestFederationCreatesQueueReceiverWithCorrectPriorityOffset(false);
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationCreatesQueueReceiverLinkIngoringConsumerPriorityOffset() throws Exception {
doTestFederationCreatesQueueReceiverWithCorrectPriorityOffset(true);
}
@ -1497,7 +1497,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testLinkCreatedForEachDistinctQueueMatchInSameConfiguredPolicyWithSameAddressMatch() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -1597,7 +1597,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteBrokerAcceptsQueuePolicyFromControlLink() throws Exception {
server.start();
@ -1633,7 +1633,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteBrokerAcceptsQueuePolicyFromControlLinkWithTransformerConfiguration() throws Exception {
server.start();
@ -1678,7 +1678,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteFederatesQueueWhenDemandIsApplied() throws Exception {
server.start();
@ -1741,7 +1741,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteFederatesQueueWhenDemandIsAppliedUsingControllerDefinedLinkCredit() throws Exception {
server.start();
@ -1805,7 +1805,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteFederatesQueueWhenDemandIsAppliedUsingPolicyDefinedLinkCredit() throws Exception {
server.start();
@ -1874,7 +1874,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteFederatesQueueAndAppliesTransformerWhenDemandIsApplied() throws Exception {
server.start();
@ -1948,7 +1948,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteBrokerAnswersAttachOfFederationReceiverProperly() throws Exception {
server.start();
server.createQueue(new QueueConfiguration("test").setRoutingType(RoutingType.ANYCAST)
@ -1992,7 +1992,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteBrokerRoutesInboundMessageToFederatedReceiver() throws Exception {
server.start();
server.createQueue(new QueueConfiguration("test").setRoutingType(RoutingType.ANYCAST)
@ -2060,7 +2060,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteBrokerCanFailLinkAttachIfQueueDoesNotExistWithoutClosingTheConnection() throws Exception {
server.start();
@ -2124,7 +2124,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteBrokerCanFailLinkAttachIfQueueDoesNotMatchFullExpectationWithoutClosingTheConnection() throws Exception {
server.start();
@ -2188,7 +2188,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteConnectionCannotAttachQueueFederationLinkWithoutControlLink() throws Exception {
server.start();
@ -2234,7 +2234,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteBrokerRoutesInboundMessageToFederatedReceiverWithFilterApplied() throws Exception {
server.start();
server.createQueue(new QueueConfiguration("test").setRoutingType(RoutingType.ANYCAST)
@ -2314,7 +2314,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testBrokerDoesNotFederateQueueIfOnlyDemandIsFromAnotherBrokerFederationSubscription() throws Exception {
try (ProtonTestServer target = new ProtonTestServer()) {
target.expectSASLAnonymousConnect();
@ -2424,7 +2424,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testBrokerCanFederateQueueIfOnlyDemandIsFromAnotherBrokerFederationSubscription() throws Exception {
try (ProtonTestServer target = new ProtonTestServer()) {
target.expectSASLAnonymousConnect();
@ -2523,7 +2523,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testTransformInboundFederatedMessageBeforeDispatch() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -2609,25 +2609,25 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testPullQueueConsumerGrantsDefaultCreditOnEmptyQueue() throws Exception {
doTestPullConsumerGrantsConfiguredCreditOnEmptyQueue(0, false, 0, false, DEFAULT_PULL_CREDIT_BATCH_SIZE);
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testPullQueueConsumerGrantsReceiverConfiguredCreditOnEmptyQueue() throws Exception {
doTestPullConsumerGrantsConfiguredCreditOnEmptyQueue(0, false, 10, true, 10);
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testPullQueueConsumerGrantsFederationConfiguredCreditOnEmptyQueue() throws Exception {
doTestPullConsumerGrantsConfiguredCreditOnEmptyQueue(20, true, 0, false, 20);
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testPullQueueConsumerGrantsReceiverConfiguredCreditOverFederationConfiguredOnEmptyQueue() throws Exception {
doTestPullConsumerGrantsConfiguredCreditOnEmptyQueue(20, true, 10, true, 10);
}
@ -2704,7 +2704,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testPullQueueConsumerGrantsCreditOnlyWhenPendingMessageIsConsumed() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -2781,25 +2781,25 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testPullQueueConsumerBatchCreditTopUpAfterEachBacklogDrain() throws Exception {
doTestPullConsumerCreditTopUpAfterEachBacklogDrain(0, false, 0, false, DEFAULT_PULL_CREDIT_BATCH_SIZE);
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testPullQueueConsumerBatchCreditTopUpAfterEachBacklogDrainFederationConfigured() throws Exception {
doTestPullConsumerCreditTopUpAfterEachBacklogDrain(10, true, 0, false, 10);
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testPullQueueConsumerBatchCreditTopUpAfterEachBacklogDrainPolicyConfigured() throws Exception {
doTestPullConsumerCreditTopUpAfterEachBacklogDrain(0, false, 20, true, 20);
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testPullQueueConsumerBatchCreditTopUpAfterEachBacklogDrainBothConfigured() throws Exception {
doTestPullConsumerCreditTopUpAfterEachBacklogDrain(100, true, 20, true, 20);
}
@ -2921,13 +2921,13 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testCoreMessageConvertedToAMQPWhenTunnelingDisabled() throws Exception {
doTestCoreMessageHandlingBasedOnTunnelingState(false);
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testCoreMessageNotConvertedToAMQPWhenTunnelingEnabled() throws Exception {
doTestCoreMessageHandlingBasedOnTunnelingState(true);
}
@ -3002,13 +3002,13 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testCoreLargeMessageConvertedToAMQPWhenTunnelingDisabled() throws Exception {
doTestCoreLargeMessageHandlingBasedOnTunnelingState(false);
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testCoreLargeMessageNotConvertedToAMQPWhenTunnelingEnabled() throws Exception {
doTestCoreLargeMessageHandlingBasedOnTunnelingState(true);
}
@ -3090,7 +3090,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationCreatesQueueReceiverLinkForQueueAfterBrokerConnectionStarted() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.start();
@ -3182,7 +3182,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationCreatesEventSenderAndReceiverWhenLocalAndRemotePoliciesAdded() throws Exception {
final MessageAnnotationsMatcher maMatcher = new MessageAnnotationsMatcher(true);
maMatcher.withEntry(OPERATION_TYPE.toString(), Matchers.is(ADD_QUEUE_POLICY));
@ -3263,7 +3263,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationSendsRemotePolicyIfEventsSenderLinkRejected() throws Exception {
final MessageAnnotationsMatcher maMatcher = new MessageAnnotationsMatcher(true);
maMatcher.withEntry(OPERATION_TYPE.toString(), Matchers.is(ADD_QUEUE_POLICY));
@ -3329,7 +3329,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteBrokerSendsQueueAddedEventForInterestedPeer() throws Exception {
final AddressSettings addressSettings = new AddressSettings();
addressSettings.setAutoCreateQueues(false);
@ -3396,7 +3396,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationCreatesAddressReceiverInResponseToAddressAddedEvent() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -3488,7 +3488,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testAddressAddedEventIgnoredIfFederationConsumerAlreadyCreated() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -3567,7 +3567,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteBrokerClosesFederationReceiverAfterQueueRemoved() throws Exception {
server.start();
server.createQueue(new QueueConfiguration("test").setRoutingType(RoutingType.ANYCAST)
@ -3646,7 +3646,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationQueueDemandTrackedWhenRemoteRejectsInitialAttempts() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();
@ -3751,7 +3751,7 @@ public class AMQPFederationQueuePolicyTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testFederationQueueDemandTrackedWhenPluginBlocksInitialAttempts() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect();

View File

@ -26,7 +26,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
import java.lang.invoke.MethodHandles;
import java.util.Arrays;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.jms.BytesMessage;
import javax.jms.Connection;
@ -117,13 +116,13 @@ public class AMQPFederationServerToServerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testAddresDemandOnLocalBrokerFederatesMessagesFromRemoteAMQP() throws Exception {
testAddresDemandOnLocalBrokerFederatesMessagesFromRemote("AMQP");
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testAddresDemandOnLocalBrokerFederatesMessagesFromRemoteCORE() throws Exception {
testAddresDemandOnLocalBrokerFederatesMessagesFromRemote("CORE");
}
@ -192,13 +191,13 @@ public class AMQPFederationServerToServerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testDivertAddressDemandOnLocalBrokerFederatesMessagesFromRemoteAMQP() throws Exception {
testDivertAddresDemandOnLocalBrokerFederatesMessagesFromRemote("AMQP");
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testDivertAddresDemandOnLocalBrokerFederatesMessagesFromRemoteCORE() throws Exception {
testDivertAddresDemandOnLocalBrokerFederatesMessagesFromRemote("CORE");
}
@ -277,13 +276,13 @@ public class AMQPFederationServerToServerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testQueueDemandOnLocalBrokerFederatesMessagesFromRemoteAMQP() throws Exception {
testQueueDemandOnLocalBrokerFederatesMessagesFromRemote("AMQP");
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testQueueDemandOnLocalBrokerFederatesMessagesFromRemoteCORE() throws Exception {
testQueueDemandOnLocalBrokerFederatesMessagesFromRemote("CORE");
}
@ -347,13 +346,13 @@ public class AMQPFederationServerToServerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testAddresDemandOnRemoteBrokerFederatesMessagesFromLocalAMQP() throws Exception {
testAddresDemandOnRemoteBrokerFederatesMessagesFromLocal("AMQP");
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testAddresDemandOnRemoteBrokerFederatesMessagesFromLocalCORE() throws Exception {
testAddresDemandOnRemoteBrokerFederatesMessagesFromLocal("CORE");
}
@ -422,13 +421,13 @@ public class AMQPFederationServerToServerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testQueueDemandOnRemoteWithRemoteConfigrationLeadsToMessageBeingFederatedAMQP() throws Exception {
testQueueDemandOnRemoteWithRemoteConfigrationLeadsToMessageBeingFederated("AMQP");
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testQueueDemandOnRemoteWithRemoteConfigrationLeadsToMessageBeingFederatedCORE() throws Exception {
testQueueDemandOnRemoteWithRemoteConfigrationLeadsToMessageBeingFederated("CORE");
}
@ -492,13 +491,13 @@ public class AMQPFederationServerToServerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testDivertAddresDemandOnRemoteBrokerFederatesMessagesFromLocalAMQP() throws Exception {
testDivertAddresDemandOnRemoteBrokerFederatesMessagesFromLocal("AMQP");
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testDivertAddresDemandOnRemoteBrokerFederatesMessagesFromLocalCORE() throws Exception {
testDivertAddresDemandOnRemoteBrokerFederatesMessagesFromLocal("CORE");
}
@ -578,21 +577,21 @@ public class AMQPFederationServerToServerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testAddresDemandOnLocalBrokerFederatesLargeMessagesFromRemoteAMQP() throws Exception {
// core tunneling shouldn't affect the AMQP message that cross
testAddresDemandOnLocalBrokerFederatesLargeMessagesFromRemote("AMQP", true);
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testAddresDemandOnLocalBrokerFederatesLargeMessagesFromRemoteCORENoTunneling() throws Exception {
// core message should be converted to AMQP and back.
testAddresDemandOnLocalBrokerFederatesLargeMessagesFromRemote("CORE", false);
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testAddresDemandOnLocalBrokerFederatesLargeMessagesFromRemoteCOREWithTunneling() throws Exception {
// core messages should be tunneled in an AMQP message an then read back
testAddresDemandOnLocalBrokerFederatesLargeMessagesFromRemote("CORE", true);
@ -679,14 +678,14 @@ public class AMQPFederationServerToServerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testQueueDemandOnLocalBrokerFederatesLargeMessagesFromRemoteAMQP() throws Exception {
// core tunneling shouldn't affect the AMQP message that cross
testQueueDemandOnLocalBrokerFederatesLargeMessagesFromRemote("AMQP", true);
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testQueueDemandOnLocalBrokerFederatesLargeMessagesFromRemoteCORENoTunneling() throws Exception {
// core message should be converted to AMQP and back.
testQueueDemandOnLocalBrokerFederatesLargeMessagesFromRemote("CORE", false);
@ -775,13 +774,13 @@ public class AMQPFederationServerToServerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testCoreMessageCrossingAddressWithThreeBrokersWithoutTunneling() throws Exception {
doTestCoreMessageCrossingAddressWithThreeBrokers(false);
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testCoreMessageCrossingAddressWithThreeBrokersWithTunneling() throws Exception {
doTestCoreMessageCrossingAddressWithThreeBrokers(true);
}
@ -953,31 +952,31 @@ public class AMQPFederationServerToServerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testCoreConsumerDemandOnLocalBrokerFederatesMessageFromAMQPClient() throws Exception {
testCoreConsumerDemandOnLocalBrokerFederatesMessageFromAMQPClient("CORE", "AMQP", false); // Tunneling doesn't matter here
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testCoreConsumerDemandOnLocalBrokerFederatesMessageFromCoreClientTunneled() throws Exception {
testCoreConsumerDemandOnLocalBrokerFederatesMessageFromAMQPClient("CORE", "CORE", true);
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testCoreConsumerDemandOnLocalBrokerFederatesMessageFromCoreClientUnTunneled() throws Exception {
testCoreConsumerDemandOnLocalBrokerFederatesMessageFromAMQPClient("CORE", "CORE", false);
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testAMQPConsumerDemandOnLocalBrokerFederatesMessageFromCoreClientTunneled() throws Exception {
testCoreConsumerDemandOnLocalBrokerFederatesMessageFromAMQPClient("AMQP", "CORE", true);
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testAMQPConsumerDemandOnLocalBrokerFederatesMessageFromCoreClientNotTunneled() throws Exception {
testCoreConsumerDemandOnLocalBrokerFederatesMessageFromAMQPClient("AMQP", "CORE", false);
}
@ -1061,13 +1060,13 @@ public class AMQPFederationServerToServerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testQueueDemandOnLocalBrokerFederatesMatchingFilteredMessagesFromRemoteAMQP() throws Exception {
testQueueDemandOnLocalBrokerFederatesMatchingFilteredMessagesFromRemote("AMQP");
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testQueueDemandOnLocalBrokerFederatesMatchingFilteredMessagesFromRemoteCORE() throws Exception {
testQueueDemandOnLocalBrokerFederatesMatchingFilteredMessagesFromRemote("CORE");
}
@ -1157,13 +1156,13 @@ public class AMQPFederationServerToServerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testAddressFederatedOverSingleConnectionNotReflectedBackToSendingNodeAMQP() throws Exception {
doTestAddressFederatedOverSingleConnectionNotReflectedBackToSendingNode("AMQP");
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testAddressFederatedOverSingleConnectionNotReflectedBackToSendingNodeCore() throws Exception {
doTestAddressFederatedOverSingleConnectionNotReflectedBackToSendingNode("CORE");
}
@ -1267,13 +1266,13 @@ public class AMQPFederationServerToServerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testAddressFederatedOnTwoConnectionsNotReflectedBackToSendingNodeAMQP() throws Exception {
doTestAddressFederatedOverTwoConnectionNotReflectedBackToSendingNode("AMQP");
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testAddressFederatedOnTwoConnectionsNotReflectedBackToSendingNodeCore() throws Exception {
doTestAddressFederatedOverTwoConnectionNotReflectedBackToSendingNode("CORE");
}

View File

@ -78,7 +78,7 @@ public class AMQPMirrorConnectionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testBrokerMirrorConnectsWithAnonymous() throws Exception {
final Map<String, Object> brokerProperties = new HashMap<>();
brokerProperties.put(AMQPMirrorControllerSource.BROKER_ID.toString(), "Test-Broker");
@ -113,7 +113,7 @@ public class AMQPMirrorConnectionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testBrokerMirrorConnectsWithPlain() throws Exception {
final Map<String, Object> brokerProperties = new HashMap<>();
brokerProperties.put(AMQPMirrorControllerSource.BROKER_ID.toString(), "Test-Broker");
@ -149,7 +149,7 @@ public class AMQPMirrorConnectionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testBrokerHandlesSenderLinkOmitsMirrorCapability() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
peer.expectSASLAnonymousConnect("PLAIN", "ANONYMOUS");
@ -181,7 +181,7 @@ public class AMQPMirrorConnectionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testBrokerAddsAddressAndQueue() throws Exception {
final Map<String, Object> brokerProperties = new HashMap<>();
brokerProperties.put(AMQPMirrorControllerSource.BROKER_ID.toString(), "Test-Broker");
@ -224,7 +224,7 @@ public class AMQPMirrorConnectionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testCreateDurableConsumerReplicatesAddressAndQueue() throws Exception {
final Map<String, Object> brokerProperties = new HashMap<>();
brokerProperties.put(AMQPMirrorControllerSource.BROKER_ID.toString(), "Test-Broker");
@ -275,13 +275,13 @@ public class AMQPMirrorConnectionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testBrokerMirrorHonorsCoreTunnelingEnable() throws Exception {
testBrokerMirrorHonorsCoreTunnelingEnableOrDisable(true);
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testBrokerMirrorHonorsCoreTunnelingDisable() throws Exception {
testBrokerMirrorHonorsCoreTunnelingEnableOrDisable(false);
}
@ -332,13 +332,13 @@ public class AMQPMirrorConnectionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testProducerMessageIsMirroredWithCoreTunnelingUsesCoreMessageFormat() throws Exception {
doTestProducerMessageIsMirroredWithCorrectMessageFormat(true);
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testProducerMessageIsMirroredWithoutCoreTunnelingUsesDefaultMessageFormat() throws Exception {
doTestProducerMessageIsMirroredWithCorrectMessageFormat(false);
}
@ -417,7 +417,7 @@ public class AMQPMirrorConnectionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testRemoteDoesNotOfferTunnelingResultsInDefaultAMQPFormattedMessages() throws Exception {
final Map<String, Object> brokerProperties = new HashMap<>();
brokerProperties.put(AMQPMirrorControllerSource.BROKER_ID.toString(), "Test-Broker");
@ -481,7 +481,7 @@ public class AMQPMirrorConnectionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testTunnelingDisabledButRemoteOffersDoesNotUseTunneling() throws Exception {
final Map<String, Object> brokerProperties = new HashMap<>();
brokerProperties.put(AMQPMirrorControllerSource.BROKER_ID.toString(), "Test-Broker");
@ -545,7 +545,7 @@ public class AMQPMirrorConnectionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testMirrorConnectionRemainsUnchangedAfterConfigurationUpdate() throws Exception {
final Map<String, Object> brokerProperties = new HashMap<>();
brokerProperties.put(AMQPMirrorControllerSource.BROKER_ID.toString(), "Test-Broker");
@ -634,7 +634,7 @@ public class AMQPMirrorConnectionTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 20000, unit = TimeUnit.MILLISECONDS)
@Timeout(20)
public void testMirrorConnectionRemainsUnchangedAfterConfigurationRemoved() throws Exception {
final Map<String, Object> brokerProperties = new HashMap<>();
brokerProperties.put(AMQPMirrorControllerSource.BROKER_ID.toString(), "Test-Broker");

View File

@ -30,7 +30,6 @@ import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.TextMessage;
import java.net.URL;
import java.util.concurrent.TimeUnit;
import org.apache.activemq.artemis.api.core.QueueConfiguration;
import org.apache.activemq.artemis.api.core.RoutingType;
@ -102,7 +101,7 @@ public class QpidDispatchPeerTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testWithMatchingDifferentNamesOnQueueKill() throws Exception {
internalMultipleQueues(true, true, true, false, false);
}
@ -111,43 +110,43 @@ public class QpidDispatchPeerTest extends AmqpClientTestSupport {
/** On this test the max reconnect attemps is reached. after a reconnect I will force a stop on the broker connection and retry it.
* The reconnection should succeed. */
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testWithMatchingDifferentNamesOnQueueKillMaxAttempts() throws Exception {
internalMultipleQueues(true, true, true, false, true);
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testWithMatchingDifferentNamesOnQueuePauseMaxAttempts() throws Exception {
internalMultipleQueues(true, true, false, true, false);
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testWithMatchingDifferentNamesOnQueuePause() throws Exception {
internalMultipleQueues(true, true, false, true, false);
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testWithMatchingDifferentNamesOnQueue() throws Exception {
internalMultipleQueues(true, true, false, false, false);
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testWithMatching() throws Exception {
internalMultipleQueues(true, false, false, false, false);
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testwithQueueName() throws Exception {
internalMultipleQueues(false, false, false, false, false);
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testwithQueueNameDistinctName() throws Exception {
internalMultipleQueues(false, true, false, false, false);
}

View File

@ -87,7 +87,7 @@ public class ValidateAMQPErrorsTest extends AmqpClientTestSupport {
* and the max retry should still be counted, not just keep connecting forever.
*/
@Test
@Timeout(value = 30_000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testConnectItself() throws Exception {
try (AssertionLoggerHandler loggerHandler = new AssertionLoggerHandler()) {
@ -111,7 +111,7 @@ public class ValidateAMQPErrorsTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 30_000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testCloseLinkOnMirror() throws Exception {
try (AssertionLoggerHandler loggerHandler = new AssertionLoggerHandler()) {
@ -176,13 +176,13 @@ public class ValidateAMQPErrorsTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 30_000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testCloseLinkOnSender() throws Exception {
doCloseLinkTestImpl(true);
}
@Test
@Timeout(value = 30_000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testCloseLinkOnReceiver() throws Exception {
doCloseLinkTestImpl(false);
}
@ -276,7 +276,7 @@ public class ValidateAMQPErrorsTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 30_000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testTimeoutOnSenderOpen() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
// Initial attempt
@ -308,7 +308,7 @@ public class ValidateAMQPErrorsTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 30_000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testReconnectAfterSenderOpenTimeout() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
// Initial attempt, times out
@ -359,7 +359,7 @@ public class ValidateAMQPErrorsTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 30_000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testNoServerOfferedMirrorCapability() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
for (int i = 0; i < 3; ++i) {
@ -397,7 +397,7 @@ public class ValidateAMQPErrorsTest extends AmqpClientTestSupport {
* @throws Exception
*/
@Test
@Timeout(value = 30_000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testReconnectAfterMirrorLinkRefusal() throws Exception {
try (ProtonTestServer peer = new ProtonTestServer()) {
// First attempt, refuse
@ -447,7 +447,7 @@ public class ValidateAMQPErrorsTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 30_000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testNoClientDesiredMirrorCapability() throws Exception {
try (AssertionLoggerHandler loggerHandler = new AssertionLoggerHandler()) {
server.start();

View File

@ -26,7 +26,6 @@ import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Session;
import java.lang.invoke.MethodHandles;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
@ -66,7 +65,7 @@ public class AmqpCoreTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMultipleCoreReceiving() throws Exception {
Connection coreJmsConn = this.createCoreConnection();
@ -101,7 +100,7 @@ public class AmqpCoreTest extends JMSClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testAmqpFailedConversionFromCore() throws Exception {
final SimpleString message = RandomUtil.randomSimpleString();
Connection coreJmsConn = this.createCoreConnection();

View File

@ -103,13 +103,13 @@ public class AMQPLargeMessageOverCoreBridgeTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCoreBridgeDivert() throws Exception {
internalTest(true);
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCoreBridgeNoDivert() throws Exception {
internalTest(false);
}

View File

@ -84,7 +84,7 @@ public class AmqpReplicatedLargeMessageTest extends AmqpReplicatedTestSupport {
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSimpleSend() throws Exception {
try {
@ -169,7 +169,7 @@ public class AmqpReplicatedLargeMessageTest extends AmqpReplicatedTestSupport {
}
@Test
@Timeout(value = 60_000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testCloseFilesOnTarget() throws Exception {
try {

View File

@ -96,19 +96,19 @@ public class SimpleStreamingLargeMessageTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendNonPersistent() throws Exception {
testSend(false, false);
}
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendPersistent() throws Exception {
testSend(true, false);
}
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSendPersistentRestartServer() throws Exception {
testSend(true, true);
}

View File

@ -61,7 +61,7 @@ public class AmqpMaxReadPagingTest extends AmqpClientTestSupport {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testMaxReadPage() throws Exception {
final int MSG_SIZE = 1000;
final StringBuilder builder = new StringBuilder();

View File

@ -73,7 +73,7 @@ public class AmqpPagingTest extends AmqpClientTestSupport {
}
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testPaging() throws Exception {
final int MSG_SIZE = 1000;
final StringBuilder builder = new StringBuilder();
@ -123,7 +123,7 @@ public class AmqpPagingTest extends AmqpClientTestSupport {
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testSizeCalculationsForApplicationProperties() throws Exception {
final int MSG_SIZE = 1000;
final StringBuilder builder = new StringBuilder();

View File

@ -39,7 +39,6 @@ import java.lang.invoke.MethodHandles;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
import org.apache.activemq.artemis.api.core.RoutingType;
import org.apache.activemq.artemis.api.core.SimpleString;
@ -410,7 +409,7 @@ public class AutoCreateJmsDestinationTest extends JMSTestBase {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
// QueueAutoCreationTest was created to validate auto-creation of queues
// and this test was added to validate a regression: https://issues.apache.org/jira/browse/ARTEMIS-2238
public void testAutoCreateOnAddressOnly() throws Exception {
@ -437,7 +436,7 @@ public class AutoCreateJmsDestinationTest extends JMSTestBase {
}
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
// QueueAutoCreationTest was created to validate auto-creation of queues
// and this test was added to validate a regression: https://issues.apache.org/jira/browse/ARTEMIS-2238
public void testAutoCreateOnAddressOnlyDuringProducerCreate() throws Exception {
@ -462,7 +461,7 @@ public class AutoCreateJmsDestinationTest extends JMSTestBase {
@Test
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
// QueueAutoCreationTest was created to validate auto-creation of queues
// and this test was added to validate a regression: https://issues.apache.org/jira/browse/ARTEMIS-2238
public void testAutoCreateOnAddressOnlyDuringProducerCreateQueueSucceed() throws Exception {

View File

@ -35,7 +35,6 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
@ -107,7 +106,7 @@ public class JMSOrderTest extends JMSTestBase {
}
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReceiveSomeThenRollback() throws Exception {
Connection connection = protocolCF.createConnection();
try {
@ -153,7 +152,7 @@ public class JMSOrderTest extends JMSTestBase {
}
@TestTemplate
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testReceiveSomeThenClose() throws Exception {
Connection connection = protocolCF.createConnection();
try {
@ -236,7 +235,7 @@ public class JMSOrderTest extends JMSTestBase {
@TestTemplate
@Timeout(value = 30000, unit = TimeUnit.MILLISECONDS)
@Timeout(30)
public void testReceiveOutOfOrderProducers() throws Exception {
Connection connection = protocolCF.createConnection();
try {

View File

@ -33,13 +33,12 @@ import javax.jms.MessageProducer;
import javax.jms.Session;
import javax.jms.TextMessage;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
public class JMSTransactionTest extends JMSTestBase {
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testAsyncProduceMessageAndCommit() throws Throwable {
final String queueName = "TEST";
final int messages = 10;

View File

@ -36,7 +36,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.lang.invoke.MethodHandles;
import java.util.Map;
import java.util.concurrent.TimeUnit;
public class TwoWayTwoNodeClusterTest extends ClusterTestBase {
@ -75,7 +74,7 @@ public class TwoWayTwoNodeClusterTest extends ClusterTestBase {
* messages after restarting.
*/
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testClusterRestartWithConfigChanged() throws Exception {
Configuration config0 = servers[0].getConfiguration();
Configuration config1 = servers[1].getConfiguration();

View File

@ -142,7 +142,7 @@ public class FailoverTest extends FailoverTestBase {
// https://issues.jboss.org/browse/HORNETQ-685
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testTimeoutOnFailover() throws Exception {
locator.setCallTimeout(1000).setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setAckBatchSize(0).setReconnectAttempts(300).setRetryInterval(10);
@ -209,7 +209,7 @@ public class FailoverTest extends FailoverTestBase {
// https://issues.jboss.org/browse/HORNETQ-685
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testTimeoutOnFailoverConsume() throws Exception {
locator.setCallTimeout(1000).setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setAckBatchSize(0).setBlockOnAcknowledge(true).setReconnectAttempts(-1).setRetryInterval(10).setAckBatchSize(0);
@ -278,7 +278,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testTimeoutOnFailoverConsumeBlocked() throws Exception {
locator.setCallTimeout(1000).setBlockOnNonDurableSend(true).setConsumerWindowSize(0).setBlockOnDurableSend(true).setAckBatchSize(0).setBlockOnAcknowledge(true).setReconnectAttempts(-1).setAckBatchSize(0).setRetryInterval(10);
@ -372,7 +372,7 @@ public class FailoverTest extends FailoverTestBase {
// https://issues.jboss.org/browse/HORNETQ-685
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testTimeoutOnFailoverTransactionCommit() throws Exception {
locator.setCallTimeout(1000).setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setAckBatchSize(0).setReconnectAttempts(300).setRetryInterval(10);
@ -442,7 +442,7 @@ public class FailoverTest extends FailoverTestBase {
* where the commit would leave the session dirty after a timeout.
*/
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testTimeoutOnFailoverTransactionCommitTimeoutCommunication() throws Exception {
locator.setCallTimeout(1000).setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setAckBatchSize(0).setReconnectAttempts(300).setRetryInterval(50);
@ -521,7 +521,7 @@ public class FailoverTest extends FailoverTestBase {
// https://issues.jboss.org/browse/HORNETQ-685
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testTimeoutOnFailoverTransactionRollback() throws Exception {
locator.setCallTimeout(2000).setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setAckBatchSize(0).setReconnectAttempts(300).setRetryInterval(10);
@ -577,7 +577,7 @@ public class FailoverTest extends FailoverTestBase {
* @throws Exception
*/
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testNonTransactedWithZeroConsumerWindowSize() throws Exception {
locator.setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setAckBatchSize(0).setReconnectAttempts(300).setRetryInterval(10);
@ -625,7 +625,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testNonTransacted() throws Exception {
createSessionFactory();
@ -655,7 +655,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 60000, unit = TimeUnit.MILLISECONDS)
@Timeout(60)
public void testFailBothRestartPrimary() throws Exception {
ServerLocator locator = getServerLocator();
@ -805,7 +805,7 @@ public class FailoverTest extends FailoverTestBase {
* @throws Exception
*/
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testFailBack() throws Exception {
boolean doFailBack = true;
HAPolicy haPolicy = backupServer.getServer().getHAPolicy();
@ -817,7 +817,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testFailBackPrimaryRestartsBackupIsGone() throws Exception {
createSessionFactory();
ClientSession session = createSessionAndQueue();
@ -867,7 +867,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testSimpleFailover() throws Exception {
HAPolicy haPolicy = backupServer.getServer().getHAPolicy();
@ -875,7 +875,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testWithoutUsingTheBackup() throws Exception {
createSessionFactory();
ClientSession session = createSessionAndQueue();
@ -1004,7 +1004,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testConsumeTransacted() throws Exception {
createSessionFactory();
@ -1077,7 +1077,7 @@ public class FailoverTest extends FailoverTestBase {
// https://jira.jboss.org/jira/browse/HORNETQ-285
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testFailoverOnInitialConnection() throws Exception {
locator.setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setReconnectAttempts(300).setRetryInterval(100);
@ -1104,7 +1104,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testTransactedMessagesSentSoRollback() throws Exception {
createSessionFactory();
@ -1144,7 +1144,7 @@ public class FailoverTest extends FailoverTestBase {
* it can be reused again
*/
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testTransactedMessagesSentSoRollbackAndContinueWork() throws Exception {
createSessionFactory();
@ -1191,7 +1191,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testTransactedMessagesNotSentSoNoRollback() throws Exception {
try {
createSessionFactory();
@ -1236,7 +1236,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testTransactedMessagesWithConsumerStartedBeforeFailover() throws Exception {
createSessionFactory();
@ -1276,7 +1276,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testTransactedMessagesConsumedSoRollback() throws Exception {
createSessionFactory();
@ -1312,7 +1312,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testTransactedMessagesNotConsumedSoNoRollback() throws Exception {
createSessionFactory();
@ -1359,7 +1359,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testXAMessagesSentSoRollbackOnEnd() throws Exception {
createSessionFactory();
@ -1395,7 +1395,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
//start a tx but sending messages after crash
public void testXAMessagesSentSoRollbackOnEnd2() throws Exception {
createSessionFactory();
@ -1434,7 +1434,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testXAMessagesSentSoRollbackOnPrepare() throws Exception {
createSessionFactory();
@ -1477,7 +1477,7 @@ public class FailoverTest extends FailoverTestBase {
// This might happen if 1PC optimisation kicks in
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testXAMessagesSentSoRollbackOnCommit() throws Exception {
createSessionFactory();
@ -1515,7 +1515,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testXAMessagesNotSentSoNoRollbackOnCommit() throws Exception {
createSessionFactory();
@ -1557,7 +1557,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testXAMessagesConsumedSoRollbackOnEnd() throws Exception {
createSessionFactory();
@ -1593,7 +1593,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testXAMessagesConsumedSoRollbackOnEnd2() throws Exception {
createSessionFactory();
@ -1634,7 +1634,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testXAMessagesConsumedSoRollbackOnPrepare() throws Exception {
createSessionFactory();
@ -1673,7 +1673,7 @@ public class FailoverTest extends FailoverTestBase {
// 1PC optimisation
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testXAMessagesConsumedSoRollbackOnCommit() throws Exception {
createSessionFactory();
ClientSession session1 = createSessionAndQueue();
@ -1717,7 +1717,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testCreateNewFactoryAfterFailover() throws Exception {
locator.setBlockOnNonDurableSend(true).setBlockOnDurableSend(true);
sf = createSessionFactoryAndWaitForTopology(locator, 2);
@ -1744,7 +1744,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testFailoverMultipleSessionsWithConsumers() throws Exception {
createSessionFactory();
@ -1798,7 +1798,7 @@ public class FailoverTest extends FailoverTestBase {
* Browser will get reset to beginning after failover
*/
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testFailWithBrowser() throws Exception {
createSessionFactory();
ClientSession session = createSession(sf, true, true);
@ -1828,7 +1828,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testFailThenReceiveMoreMessagesAfterFailover() throws Exception {
createSessionFactory();
@ -1906,7 +1906,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testFailThenReceiveMoreMessagesAfterFailover2() throws Exception {
locator.setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setBlockOnAcknowledge(true).setReconnectAttempts(300).setRetryInterval(100);
@ -1940,25 +1940,25 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testSimpleSendAfterFailoverDurableTemporary() throws Exception {
doSimpleSendAfterFailover(true, true);
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testSimpleSendAfterFailoverNonDurableTemporary() throws Exception {
doSimpleSendAfterFailover(false, true);
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testSimpleSendAfterFailoverDurableNonTemporary() throws Exception {
doSimpleSendAfterFailover(true, false);
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testSimpleSendAfterFailoverNonDurableNonTemporary() throws Exception {
doSimpleSendAfterFailover(false, false);
}
@ -1986,7 +1986,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testMultipleSessionFailover() throws Exception {
final String address = "TEST";
locator.setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setBlockOnAcknowledge(true).setReconnectAttempts(300).setRetryInterval(100);
@ -2030,7 +2030,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testChannelStateDuringFailover() throws Exception {
locator.setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setBlockOnAcknowledge(true).setReconnectAttempts(300).setRetryInterval(100);
@ -2065,7 +2065,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testForceBlockingReturn() throws Exception {
locator.setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setBlockOnAcknowledge(true).setReconnectAttempts(300).setRetryInterval(100);
@ -2124,7 +2124,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testCommitOccurredUnblockedAndResendNoDuplicates() throws Exception {
locator.setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setReconnectAttempts(300).setRetryInterval(100).setBlockOnAcknowledge(true);
@ -2256,7 +2256,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testCommitDidNotOccurUnblockedAndResend() throws Exception {
locator.setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setBlockOnAcknowledge(true).setReconnectAttempts(300).setRetryInterval(100);
@ -2342,7 +2342,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testBackupServerNotRemoved() throws Exception {
// HORNETQ-720 Disabling test for replicating backups.
if (!(backupServer.getServer().getHAPolicy() instanceof SharedStoreBackupPolicy)) {
@ -2376,7 +2376,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testPrimaryAndBackupPrimaryComesBack() throws Exception {
createSessionFactory();
final CountDownLatch latch = new CountDownLatch(1);
@ -2408,7 +2408,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testPrimaryAndBackupPrimaryComesBackNewFactory() throws Exception {
createSessionFactory();
@ -2457,7 +2457,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testPrimaryAndBackupBackupComesBackNewFactory() throws Exception {
locator.setBlockOnNonDurableSend(true).setBlockOnDurableSend(true).setReconnectAttempts(300).setRetryInterval(100);
@ -2514,7 +2514,7 @@ public class FailoverTest extends FailoverTestBase {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testBackupConnections() throws Exception {
assumeTrue(backupServer.getServer().getHAPolicy().isBackup());

View File

@ -28,7 +28,6 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
import org.apache.activemq.artemis.api.core.QueueConfiguration;
import org.apache.activemq.artemis.api.core.TransportConfiguration;
@ -190,7 +189,7 @@ public class FileLockNodeManagerTest extends FailoverTestBase {
}
@TestTemplate
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testSimpleFailover() throws Exception {
Map<String, Object> params = new HashMap<>();
params.put(TransportConstants.HOST_PROP_NAME, "127.0.0.1");

View File

@ -27,7 +27,6 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
import org.apache.activemq.artemis.api.core.QueueConfiguration;
import org.apache.activemq.artemis.api.core.TransportConfiguration;
@ -141,7 +140,7 @@ public class NettyFailoverTestBase extends FailoverTest {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testFailoverWithHostAlias() throws Exception {
Map<String, Object> params = new HashMap<>();
params.put(TransportConstants.HOST_PROP_NAME, "127.0.0.1");

View File

@ -25,7 +25,6 @@ import javax.jms.MessageProducer;
import javax.jms.Session;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import org.apache.activemq.artemis.api.core.QueueConfiguration;
import org.apache.activemq.artemis.api.core.RoutingType;
@ -89,7 +88,7 @@ public class PageCleanupWhileReplicaCatchupTest extends FailoverTestBase {
}
@Test
@Timeout(value = 160_000, unit = TimeUnit.MILLISECONDS)
@Timeout(160)
public void testPageCleanup() throws Throwable {
Worker[] workers = new Worker[NUMBER_OF_WORKERS];

View File

@ -61,7 +61,7 @@ public class ReplicatedFailoverTest extends FailoverTest {
}
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
/*
* default maxSavedReplicatedJournalsSize is 2, this means the backup will fall back to replicated only twice, after this
* it is stopped permanently

View File

@ -19,7 +19,6 @@ package org.apache.activemq.artemis.tests.integration.cluster.failover;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.util.HashMap;
import java.util.concurrent.TimeUnit;
import org.apache.activemq.artemis.api.core.QueueConfiguration;
import org.apache.activemq.artemis.api.core.client.ClientConsumer;
@ -64,14 +63,14 @@ public class ReplicatedPagedFailoverTest extends ReplicatedFailoverTest {
@Override
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testReplicatedFailback() throws Exception {
super.testReplicatedFailback();
}
@Override
@Test
@Timeout(value = 120000, unit = TimeUnit.MILLISECONDS)
@Timeout(120)
public void testFailoverOnInitialConnection() throws Exception {
super.testFailoverOnInitialConnection();
}

Some files were not shown because too many files have changed in this diff Show More