Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed: MqttFlowSpec mqtt server flow should receive a bidirectional connection and a subscription to a topic #1549

Closed
2m opened this issue Mar 1, 2019 · 24 comments

Comments

@2m
Copy link
Contributor

2m commented Mar 1, 2019

[info] MqttFlowSpec:
[info] mqtt client flow
[info] - should establish a bidirectional connection and subscribe to a topic (488 milliseconds)
[info] mqtt server flow
[info] - should receive a bidirectional connection and a subscription to a topic *** FAILED *** (5 seconds, 131 milliseconds)
[info]   A timeout occurred waiting for a future to complete. Queried 51 times, sleeping 100000000 nanoseconds between each query. (MqttFlowSpec.scala:151)
[info]   org.scalatest.concurrent.Futures$FutureConcept$$anon$1:
[info]   at org.scalatest.concurrent.Futures$FutureConcept.tryTryAgain$1(Futures.scala:538)
[info]   at org.scalatest.concurrent.Futures$FutureConcept.futureValueImpl(Futures.scala:550)
[info]   at org.scalatest.concurrent.Futures$FutureConcept.futureValueImpl$(Futures.scala:479)
[info]   at org.scalatest.concurrent.ScalaFutures$$anon$1.futureValueImpl(ScalaFutures.scala:275)
[info]   at org.scalatest.concurrent.Futures$FutureConcept.futureValue(Futures.scala:476)
[info]   at org.scalatest.concurrent.Futures$FutureConcept.futureValue$(Futures.scala:475)
[info]   at org.scalatest.concurrent.ScalaFutures$$anon$1.futureValue(ScalaFutures.scala:275)
[info]   at docs.scaladsl.MqttFlowSpec.$anonfun$new$4(MqttFlowSpec.scala:151)
[info]   at org.scalatest.OutcomeOf.outcomeOf(OutcomeOf.scala:85)
[info]   at org.scalatest.OutcomeOf.outcomeOf$(OutcomeOf.scala:83)
[info]   at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)

https://travis-ci.org/akka/alpakka/jobs/500172922

This was referenced Mar 1, 2019
@huntc
Copy link
Contributor

huntc commented Mar 1, 2019

Hmm. I thought I had fixed this... will have to look again.

@ennru
Copy link
Member

ennru commented Mar 13, 2019

New failure for this test during assertAllStagesStopped.

https://travis-ci.org/akka/alpakka/jobs/505595719#L701

@2m
Copy link
Contributor Author

2m commented May 28, 2019

@2m
Copy link
Contributor Author

2m commented Aug 8, 2019

@seglo
Copy link
Contributor

seglo commented Oct 19, 2019

@ennru
Copy link
Member

ennru commented Dec 13, 2019

@ennru ennru mentioned this issue Dec 13, 2019
@seglo
Copy link
Contributor

seglo commented Jan 6, 2020

@seglo
Copy link
Contributor

seglo commented Jan 8, 2020

@ennru
Copy link
Member

ennru commented Jan 20, 2020

This keeps failing annoyingly often.
Hopefully the captured log can help to understand the cause
https://travis-ci.com/akka/alpakka/jobs/277511548#L452 in #2040

@raboof
Copy link
Contributor

raboof commented Feb 14, 2020

@raboof
Copy link
Contributor

raboof commented Feb 14, 2020

@ennru
Copy link
Member

ennru commented Mar 16, 2020

@raboof
Copy link
Contributor

raboof commented Mar 17, 2020

(this failure also occurs for TypedMqttFlowSpec, e.g. https://travis-ci.com/github/akka/alpakka/jobs/298850833)

@ennru
Copy link
Member

ennru commented Mar 17, 2020

This is expected to be fixed with #2207

@ennru ennru closed this as completed Mar 17, 2020
@ennru ennru added this to the 2.0.0 milestone Mar 17, 2020
@ennru
Copy link
Member

ennru commented Mar 24, 2020

It shows again in #2227

UntypedMqttFlowSpec:
mqtt server flow
- should receive a bidirectional connection and a subscription to a topic *** FAILED *** (5 seconds, 182 milliseconds)
  A timeout occurred waiting for a future to complete. Queried 51 times, sleeping 100000000 nanoseconds between each query. (MqttFlowSpec.scala:176)
  org.scalatest.concurrent.Futures$FutureConcept$$anon$1:
  at org.scalatest.concurrent.Futures$FutureConcept.tryTryAgain$1(Futures.scala:538)
  at org.scalatest.concurrent.Futures$FutureConcept.futureValueImpl(Futures.scala:550)
  at org.scalatest.concurrent.Futures$FutureConcept.futureValueImpl$(Futures.scala:479)
  at org.scalatest.concurrent.ScalaFutures$$anon$1.futureValueImpl(ScalaFutures.scala:275)
  at org.scalatest.concurrent.Futures$FutureConcept.futureValue(Futures.scala:476)
  at org.scalatest.concurrent.Futures$FutureConcept.futureValue$(Futures.scala:475)
  at org.scalatest.concurrent.ScalaFutures$$anon$1.futureValue(ScalaFutures.scala:275)
  at docs.scaladsl.MqttFlowSpec.$anonfun$$init$$7(MqttFlowSpec.scala:176)

@ennru ennru reopened this Mar 24, 2020
@ennru
Copy link
Member

ennru commented Apr 28, 2020

@seglo
Copy link
Contributor

seglo commented Apr 28, 2020

@seglo
Copy link
Contributor

seglo commented Sep 14, 2020

@ennru
Copy link
Member

ennru commented Sep 21, 2020

https://travis-ci.com/github/akka/alpakka/jobs/387994230#L420

[info] TypedMqttFlowSpec:
[info] mqtt server flow
[info] - should receive a bidirectional connection and a subscription to a topic *** FAILED *** (5 seconds, 84 milliseconds)
[info]   A timeout occurred waiting for a future to complete. Waited 5000000000 nanoseconds. (MqttFlowSpec.scala:176)
[info]   org.scalatest.concurrent.ScalaFutures$$anon$1$$anon$2:
[info]   at org.scalatest.concurrent.ScalaFutures$$anon$1.futureValueImpl(ScalaFutures.scala:339)
[info]   at org.scalatest.concurrent.Futures$FutureConcept.futureValue(Futures.scala:476)
[info]   at org.scalatest.concurrent.Futures$FutureConcept.futureValue$(Futures.scala:475)
[info]   at org.scalatest.concurrent.ScalaFutures$$anon$1.futureValue(ScalaFutures.scala:281)
[info]   at docs.scaladsl.MqttFlowSpec.$anonfun$$init$$7(MqttFlowSpec.scala:176)

This continues to fail quite often. (Would you have time to take a look, @huntc?)

@ennru
Copy link
Member

ennru commented Sep 23, 2020

@ennru
Copy link
Member

ennru commented Oct 5, 2020

In the logs, this message seems relevant to me. The test expects the Publish, but the PublishReceivedLocally wasn't handled.

[received] Element: Right(Event(SubAck(PacketId(1),Vector(ControlPacketFlags(2))),None))

Message [akka.stream.alpakka.mqtt.streaming.impl.ClientConnection$PublishReceivedLocally] 
to Actor[akka://TypedMqttFlowSpec/system/server-connector-2/client-connection-typed-flow-spec%2Fflow#-297118130] 
was unhandled. 

https://travis-ci.com/github/akka/alpakka/jobs/389369053#L1182

@ennru
Copy link
Member

ennru commented Oct 5, 2020

It appears to me that #2189 might prevent this error. When I compare the order of events in the failures with what successful execution does, it looks like things get stuck when they arrive in a different order.

@raboof
Copy link
Contributor

raboof commented Oct 19, 2020

raboof added a commit to raboof/alpakka that referenced this issue Oct 19, 2020

Verified

This commit was signed with the committer’s verified signature. The key has expired.
raboof Arnout Engelen
Refs akka#1549
@ennru
Copy link
Member

ennru commented Apr 24, 2023

This test is reenabled as it was related to the wrong encoding of QoS levels which was fixed in

@ennru ennru closed this as completed Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants