clebertsuconic commented on code in PR #4556:
URL: https://github.com/apache/activemq-artemis/pull/4556#discussion_r1268135758
##########
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/mqtt/MQTTInterceptorPropertiesTest.java:
##########
@@ -89,25 +83,25 @@ public void testCheckInterceptedMQTTMessageProperties()
throws Exception {
server.getRemotingService().addIncomingInterceptor(incomingInterceptor);
server.getRemotingService().addOutgoingInterceptor(outgoingInterceptor);
+ final MQTTClientProvider publishProvider = getMQTTClientProvider();
+ initializeConnection(publishProvider);
+ publishProvider.publish(addressQueue, msgText.getBytes(), AT_MOST_ONCE,
retained);
- Thread thread = new Thread(new Runnable() {
- @Override
- public void run() {
- try {
- byte[] payload = subscribeProvider.receive(10000);
- assertNotNull("Should get a message", payload);
- latch.countDown();
- } catch (Exception e) {
- e.printStackTrace();
- }
+ final MQTTClientProvider subscribeProvider = getMQTTClientProvider();
+ initializeConnection(subscribeProvider);
+ subscribeProvider.subscribe(addressQueue, AT_MOST_ONCE);
+
+ Thread thread = new Thread(() -> {
+ try {
+ byte[] payload = subscribeProvider.receive(10000);
+ assertNotNull("Should get a message", payload);
+ latch.countDown();
+ } catch (Exception e) {
Review Comment:
catch Throwable here... an assertionNotNull would throw a Throwable...
would not be caught here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]