NO-JIRA: more fixes on plugintests
some asynchronously things on the server were making these to fail. add some checkpoints to make sure it happens smoothly.
This commit is contained in:
parent
36a948b225
commit
0bfdcb764c
|
@ -176,8 +176,10 @@ public class CorePluginTest extends JMSTestBase {
|
|||
prod.setTimeToLive(500);
|
||||
MessageConsumer cons = sess.createConsumer(queue);
|
||||
|
||||
TextMessage msg1 = sess.createTextMessage("test");
|
||||
prod.send(msg1);
|
||||
for (int i = 0; i < 10; i++) {
|
||||
TextMessage msg1 = sess.createTextMessage("test");
|
||||
prod.send(msg1);
|
||||
}
|
||||
Thread.sleep(500);
|
||||
assertNull(cons.receive(500));
|
||||
|
||||
|
|
|
@ -278,7 +278,7 @@ public class MethodCalledVerifier implements ActiveMQServerPlugin {
|
|||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
assertTrue("validating method " + name, count <= methodCalls.getOrDefault(name, new AtomicInteger()).get());
|
||||
assertTrue("validating method " + name + " expected less than " + count, count <= methodCalls.getOrDefault(name, new AtomicInteger()).get());
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -109,6 +109,10 @@ public class StompPluginTest extends StompTestBase {
|
|||
System.out.println("received " + frame);
|
||||
Assert.assertEquals(Stomp.Responses.MESSAGE, frame.getCommand());
|
||||
|
||||
verifier.validatePluginMethodsAtLeast(1, MESSAGE_ACKED, BEFORE_SEND, AFTER_SEND, BEFORE_MESSAGE_ROUTE, AFTER_MESSAGE_ROUTE, BEFORE_DELIVER,
|
||||
AFTER_DELIVER);
|
||||
|
||||
|
||||
// unsub
|
||||
unsubscribe(newConn, "a-sub");
|
||||
|
||||
|
|
Loading…
Reference in New Issue