Skip to content

Commit b68c8e4

Browse files
committed
Add error descriptions to mqtt system tests
1 parent c12e58e commit b68c8e4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

system_tests/utils.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -859,16 +859,16 @@ func publishAndConsumeMQTTMsg(hostname, port, username, password string, overWeb
859859
}
860860

861861
token = c.Subscribe(topic, 0, handler)
862-
ExpectWithOffset(1, token.Wait()).To(BeTrue())
863-
ExpectWithOffset(1, token.Error()).ToNot(HaveOccurred())
862+
ExpectWithOffset(1, token.Wait()).To(BeTrue(), "Subscribe token should return true")
863+
ExpectWithOffset(1, token.Error()).ToNot(HaveOccurred(), "Subscribe token received error")
864864

865865
token = c.Publish(topic, 0, false, "test message MQTT")
866-
ExpectWithOffset(1, token.Wait()).To(BeTrue())
867-
ExpectWithOffset(1, token.Error()).ToNot(HaveOccurred())
866+
ExpectWithOffset(1, token.Wait()).To(BeTrue(), "Publish token should return true")
867+
ExpectWithOffset(1, token.Error()).ToNot(HaveOccurred(), "Publish token received error")
868868

869869
EventuallyWithOffset(1, func() bool {
870870
return msgReceived
871-
}, 5*time.Second).Should(BeTrue())
871+
}, 5*time.Second).Should(BeTrue(), "Expect to receive message")
872872

873873
token = c.Unsubscribe(topic)
874874
ExpectWithOffset(1, token.Wait()).To(BeTrue())

0 commit comments

Comments
 (0)