Skip to content

Commit 9873bef

Browse files
committed
Use emqtt in some tests where mosquitto has bugs
1 parent d495582 commit 9873bef

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

MQTTClient/MQTTClientTests/MQTTClientSubscriptionTests.m

+16-14
Original file line numberDiff line numberDiff line change
@@ -520,13 +520,14 @@ - (void)testUnsubscribeTopicEmpty_MQTT_4_7_3_1 {
520520

521521
- (void)testUnsubscribeTopicNone_MQTT_3_10_3_2 {
522522
MQTTStrict.strict = FALSE;
523-
for (NSString *broker in MQTTTestHelpers.brokers.allKeys) {
524-
DDLogVerbose(@"testing broker %@", broker);
525-
NSDictionary *parameters = MQTTTestHelpers.brokers[broker];
526-
[self connect:parameters];
527-
[self testUnsubscribeTopicCloseExpected:nil];
528-
[self shutdown:parameters];
529-
}
523+
// Test specifically with emqtt because there is a bug
524+
// in mosquitto: https://github.com/eclipse/mosquitto/issues/665
525+
NSString *broker = @"emqtt";
526+
DDLogVerbose(@"testing broker %@", broker);
527+
NSDictionary *parameters = MQTTTestHelpers.allBrokers[broker];
528+
[self connect:parameters];
529+
[self testUnsubscribeTopicCloseExpected:nil];
530+
[self shutdown:parameters];
530531
}
531532

532533
- (void)testUnsubscribeTopicZero_MQTT_4_7_3_1 {
@@ -542,13 +543,14 @@ - (void)testUnsubscribeTopicZero_MQTT_4_7_3_1 {
542543

543544
- (void)testMultiUnsubscribe_None_MQTT_3_10_3_2 {
544545
MQTTStrict.strict = FALSE;
545-
for (NSString *broker in MQTTTestHelpers.brokers.allKeys) {
546-
DDLogVerbose(@"testing broker %@", broker);
547-
NSDictionary *parameters = MQTTTestHelpers.brokers[broker];
548-
[self connect:parameters];
549-
[self testMultiUnsubscribeTopicCloseExpected:@[]];
550-
[self shutdown:parameters];
551-
}
546+
// Test specifically with emqtt because there is a bug
547+
// in mosquitto: https://github.com/eclipse/mosquitto/issues/665
548+
NSString *broker = @"emqtt";
549+
DDLogVerbose(@"testing broker %@", broker);
550+
NSDictionary *parameters = MQTTTestHelpers.allBrokers[broker];
551+
[self connect:parameters];
552+
[self testMultiUnsubscribeTopicCloseExpected:@[]];
553+
[self shutdown:parameters];
552554
}
553555

554556
- (void)testMultiUnsubscribe_One {

0 commit comments

Comments
 (0)