Moved the overrideSubscription test from SubscriptionsStoreTest to a new test case named ClientSession. Removed a parameter in ClientSession.subscribe method. topicFilter param had no use but for logging purposes.

This commit is contained in:
kevto
2016-07-17 14:24:19 +02:00
parent 3d2e69cc21
commit 486b4fe8ba
5 changed files with 71 additions and 31 deletions
@@ -94,9 +94,9 @@ public class ClientSession {
return "ClientSession{clientID='" + clientID + '\'' +"}";
}
public boolean subscribe(String topicFilter, Subscription newSubscription) {
LOG.info("<{}> subscribed to topicFilter <{}> with QoS {}",
newSubscription.getClientId(), topicFilter,
public boolean subscribe(Subscription newSubscription) {
LOG.info("<{}> subscribed to the topic filter <{}> with QoS {}",
newSubscription.getClientId(), newSubscription.getTopicFilter(),
AbstractMessage.QOSType.formatQoS(newSubscription.getRequestedQos()));
boolean validTopic = SubscriptionsStore.validate(newSubscription.getTopicFilter());
if (!validTopic) {