Added username to all messages. From a consumer perspective the username is more useful than a clientID which is often autogenerated.
This commit is contained in:
@@ -97,28 +97,28 @@ public class BrokerInterceptorTest {
|
||||
|
||||
@Test
|
||||
public void testNotifyClientDisconnected() throws Exception {
|
||||
interceptor.notifyClientDisconnected("cli1234");
|
||||
interceptor.notifyClientDisconnected("cli1234","cli1234");
|
||||
interval();
|
||||
assertEquals(50, n.get());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNotifyTopicPublished() throws Exception {
|
||||
interceptor.notifyTopicPublished(new PublishMessage(), "cli1234");
|
||||
interceptor.notifyTopicPublished(new PublishMessage(), "cli1234", "cli1234");
|
||||
interval();
|
||||
assertEquals(60, n.get());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNotifyTopicSubscribed() throws Exception {
|
||||
interceptor.notifyTopicSubscribed(new Subscription("cli1", "o2", AbstractMessage.QOSType.MOST_ONE));
|
||||
interceptor.notifyTopicSubscribed(new Subscription("cli1", "o2", AbstractMessage.QOSType.MOST_ONE), "cli1234");
|
||||
interval();
|
||||
assertEquals(70, n.get());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNotifyTopicUnsubscribed() throws Exception {
|
||||
interceptor.notifyTopicUnsubscribed("o2", "cli1234");
|
||||
interceptor.notifyTopicUnsubscribed("o2", "cli1234", "cli1234");
|
||||
interval();
|
||||
assertEquals(80, n.get());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user