ARTEMIS-3896 fix tests
This commit is contained in:
parent
14a4446ec1
commit
4974f2a9f0
|
@ -75,9 +75,9 @@ public class AuditLoggerAMQPMutualSSLTest extends AuditLoggerTestBase {
|
||||||
|
|
||||||
checkAuditLogRecord(true, "AMQ601715: User myUser(producers)@", "successfully authenticated");
|
checkAuditLogRecord(true, "AMQ601715: User myUser(producers)@", "successfully authenticated");
|
||||||
checkAuditLogRecord(true, "AMQ601267: User myUser(producers)@", "is creating a core session");
|
checkAuditLogRecord(true, "AMQ601267: User myUser(producers)@", "is creating a core session");
|
||||||
checkAuditLogRecord(true, "AMQ601500: User myUser(producers)@", "is sending a message AMQPStandardMessage");
|
checkAuditLogRecord(true, "AMQ601500: User myUser(producers)@", "sent a message AMQPStandardMessage");
|
||||||
checkAuditLogRecord(true, "AMQ601265: User myUser(producers)@", "is creating a core consumer");
|
checkAuditLogRecord(true, "AMQ601265: User myUser(producers)@", "is creating a core consumer");
|
||||||
checkAuditLogRecord(true, "AMQ601501: User myUser(producers)@", "is consuming a message from exampleQueue");
|
checkAuditLogRecord(true, "AMQ601501: User myUser(producers)@", "is consuming a message from exampleQueue");
|
||||||
checkAuditLogRecord(true, "AMQ601502: User myUser(producers)@", "is acknowledging a message from exampleQueue: AMQPStandardMessage");
|
checkAuditLogRecord(true, "AMQ601502: User myUser(producers)@", "acknowledged message from exampleQueue: AMQPStandardMessage");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,19 +52,19 @@ public class AuditLoggerResourceTest extends AuditLoggerTestBase {
|
||||||
ActiveMQServerControl serverControl = MBeanServerInvocationHandler.newProxyInstance(mBeanServerConnection, objectNameBuilder.getActiveMQServerObjectName(), ActiveMQServerControl.class, false);
|
ActiveMQServerControl serverControl = MBeanServerInvocationHandler.newProxyInstance(mBeanServerConnection, objectNameBuilder.getActiveMQServerObjectName(), ActiveMQServerControl.class, false);
|
||||||
|
|
||||||
serverControl.createAddress("auditAddress", "ANYCAST,MULTICAST");
|
serverControl.createAddress("auditAddress", "ANYCAST,MULTICAST");
|
||||||
checkAuditLogRecord(true, "successfully created Address:");
|
checkAuditLogRecord(true, "successfully created address:");
|
||||||
serverControl.updateAddress("auditAddress", "ANYCAST");
|
serverControl.updateAddress("auditAddress", "ANYCAST");
|
||||||
checkAuditLogRecord(true, "successfully updated Address:");
|
checkAuditLogRecord(true, "successfully updated address:");
|
||||||
serverControl.deleteAddress("auditAddress");
|
serverControl.deleteAddress("auditAddress");
|
||||||
checkAuditLogRecord(true, "successfully deleted Address:");
|
checkAuditLogRecord(true, "successfully deleted address:");
|
||||||
serverControl.createQueue("auditAddress", "auditQueue", "ANYCAST");
|
serverControl.createQueue("auditAddress", "auditQueue", "ANYCAST");
|
||||||
checkAuditLogRecord(true, "successfully created Queue:");
|
checkAuditLogRecord(true, "successfully created queue:");
|
||||||
serverControl.updateQueue("auditQueue", "ANYCAST", -1, false);
|
serverControl.updateQueue("auditQueue", "ANYCAST", -1, false);
|
||||||
final QueueControl queueControl = MBeanServerInvocationHandler.newProxyInstance(mBeanServerConnection,
|
final QueueControl queueControl = MBeanServerInvocationHandler.newProxyInstance(mBeanServerConnection,
|
||||||
objectNameBuilder.getQueueObjectName(new SimpleString( "auditAddress"), new SimpleString("auditQueue"), RoutingType.ANYCAST),
|
objectNameBuilder.getQueueObjectName(new SimpleString( "auditAddress"), new SimpleString("auditQueue"), RoutingType.ANYCAST),
|
||||||
QueueControl.class,
|
QueueControl.class,
|
||||||
false);
|
false);
|
||||||
checkAuditLogRecord(true, "successfully updated Queue:");
|
checkAuditLogRecord(true, "successfully updated queue:");
|
||||||
queueControl.removeAllMessages();
|
queueControl.removeAllMessages();
|
||||||
checkAuditLogRecord(true, "has removed 0 messages");
|
checkAuditLogRecord(true, "has removed 0 messages");
|
||||||
queueControl.sendMessage(new HashMap<>(), 0, "foo", true, "admin", "admin");
|
queueControl.sendMessage(new HashMap<>(), 0, "foo", true, "admin", "admin");
|
||||||
|
@ -72,7 +72,7 @@ public class AuditLoggerResourceTest extends AuditLoggerTestBase {
|
||||||
CompositeData[] browse = queueControl.browse();
|
CompositeData[] browse = queueControl.browse();
|
||||||
checkAuditLogRecord(true, "browsed " + browse.length + " messages");
|
checkAuditLogRecord(true, "browsed " + browse.length + " messages");
|
||||||
serverControl.destroyQueue("auditQueue");
|
serverControl.destroyQueue("auditQueue");
|
||||||
checkAuditLogRecord(true, "successfully deleted Queue:");
|
checkAuditLogRecord(true, "successfully deleted queue:");
|
||||||
|
|
||||||
ServerLocator locator = createNettyNonHALocator();
|
ServerLocator locator = createNettyNonHALocator();
|
||||||
ClientSessionFactory sessionFactory = locator.createSessionFactory();
|
ClientSessionFactory sessionFactory = locator.createSessionFactory();
|
||||||
|
|
|
@ -162,7 +162,7 @@ public class AuditLoggerTest extends AuditLoggerTestBase {
|
||||||
Assert.assertEquals(2, addressControl.getMessageCount());
|
Assert.assertEquals(2, addressControl.getMessageCount());
|
||||||
|
|
||||||
checkAuditLogRecord(false, "messageID=0");
|
checkAuditLogRecord(false, "messageID=0");
|
||||||
checkAuditLogRecord(true, "sending a message");
|
checkAuditLogRecord(true, "sent a message");
|
||||||
checkAuditLogRecord(true, uniqueStr);
|
checkAuditLogRecord(true, uniqueStr);
|
||||||
checkAuditLogRecord(true, "Hello2");
|
checkAuditLogRecord(true, "Hello2");
|
||||||
|
|
||||||
|
@ -176,6 +176,6 @@ public class AuditLoggerTest extends AuditLoggerTestBase {
|
||||||
connection.close();
|
connection.close();
|
||||||
}
|
}
|
||||||
checkAuditLogRecord(true, "is consuming a message from");
|
checkAuditLogRecord(true, "is consuming a message from");
|
||||||
checkAuditLogRecord(true, "is acknowledging a message from");
|
checkAuditLogRecord(true, "acknowledged message from");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue