|
|
@ -124,7 +124,7 @@ public class BasicMqttCredentialsTest extends AbstractMqttIntegrationTest { |
|
|
mqttTestClient.connectAndWait(USER_NAME3, "WRONG PASSWORD"); |
|
|
mqttTestClient.connectAndWait(USER_NAME3, "WRONG PASSWORD"); |
|
|
Assert.fail(); // This should not happens, because we have a wrong password
|
|
|
Assert.fail(); // This should not happens, because we have a wrong password
|
|
|
} catch (MqttException e) { |
|
|
} catch (MqttException e) { |
|
|
Assert.assertEquals(4, e.getReasonCode()); // 4 - Reason code for bad username or password in MQTT v3
|
|
|
Assert.assertEquals(5, e.getReasonCode()); // 4 - Reason code not authorized in MQTT v3
|
|
|
} |
|
|
} |
|
|
Assertions.assertThrows(MqttException.class, () -> { |
|
|
Assertions.assertThrows(MqttException.class, () -> { |
|
|
testTelemetryIsNotDelivered(clientIdAndUserNameAndPasswordDevice3, mqttTestClient); |
|
|
testTelemetryIsNotDelivered(clientIdAndUserNameAndPasswordDevice3, mqttTestClient); |
|
|
|