NO-JIRA fixing another test

test failing: org.apache.activemq.artemis.tests.integration.management.AddressControlTest.testSendMessage
This commit is contained in:
Clebert Suconic 2019-03-12 20:21:03 -04:00
parent 564b75d66f
commit 3473618a06
2 changed files with 4 additions and 1 deletions

View File

@ -307,6 +307,7 @@ public class AddressControlImpl extends AbstractControl implements AddressContro
try {
return sendMessage(addressInfo.getName(), server, headers, type, body, durable, user, password);
} catch (Exception e) {
e.printStackTrace();
throw new IllegalStateException(e.getMessage());
}
}

View File

@ -435,7 +435,9 @@ public class ServerSessionImpl implements ServerSession, FailureListener {
private void sendSessionNotification(final CoreNotificationType type) throws Exception {
final TypedProperties props = new TypedProperties();
props.putSimpleStringProperty(ManagementHelper.HDR_CONNECTION_NAME, SimpleString.toSimpleString(this.getConnectionID().toString()));
if (this.getConnectionID() != null) {
props.putSimpleStringProperty(ManagementHelper.HDR_CONNECTION_NAME, SimpleString.toSimpleString(this.getConnectionID().toString()));
}
props.putSimpleStringProperty(ManagementHelper.HDR_USER, SimpleString.toSimpleString(this.getUsername()));
props.putSimpleStringProperty(ManagementHelper.HDR_SESSION_NAME, SimpleString.toSimpleString(this.getName()));