@@ -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