ProtocolProcessorTest#testCleanRetainedStoreAfterAQoS0AndRetainedTrue:
check added if test is in the correct state
This commit is contained in:
@@ -461,7 +461,14 @@ public class ProtocolProcessorTest {
|
|||||||
.messageId(100)
|
.messageId(100)
|
||||||
.build();
|
.build();
|
||||||
m_processor.processPublish(m_channel, msg);
|
m_processor.processPublish(m_channel, msg);
|
||||||
|
|
||||||
|
Collection<IMessagesStore.StoredMessage> messages = m_messagesStore.searchMatching(new IMatchingCondition() {
|
||||||
|
public boolean match(String key) {
|
||||||
|
return SubscriptionsStore.matchTopics(key, FAKE_TOPIC);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
assertFalse(messages.isEmpty());
|
||||||
|
|
||||||
//Exercise
|
//Exercise
|
||||||
MqttPublishMessage cleanPubMsg = MessageBuilder.publish()
|
MqttPublishMessage cleanPubMsg = MessageBuilder.publish()
|
||||||
.topicName(FAKE_TOPIC)
|
.topicName(FAKE_TOPIC)
|
||||||
@@ -473,7 +480,7 @@ public class ProtocolProcessorTest {
|
|||||||
m_processor.processPublish(m_channel, cleanPubMsg);
|
m_processor.processPublish(m_channel, cleanPubMsg);
|
||||||
|
|
||||||
//Verify
|
//Verify
|
||||||
Collection<IMessagesStore.StoredMessage> messages = m_messagesStore.searchMatching(new IMatchingCondition() {
|
messages = m_messagesStore.searchMatching(new IMatchingCondition() {
|
||||||
public boolean match(String key) {
|
public boolean match(String key) {
|
||||||
return SubscriptionsStore.matchTopics(key, FAKE_TOPIC);
|
return SubscriptionsStore.matchTopics(key, FAKE_TOPIC);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user