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

NPE using assertAllStagesStopped #111

Open
cchantep opened this issue Jul 20, 2017 · 6 comments
Open

NPE using assertAllStagesStopped #111

cchantep opened this issue Jul 20, 2017 · 6 comments
Labels

Comments

@cchantep
Copy link
Contributor

Upgrading from Akka 2.4.x with Contrib 0.6 to Akka 2.5 with Contrib 0.8 a NPE is raised from the .assertAllStagesStopped utility.

java.lang.NullPointerException: null (PhasedFusingActorMaterializer.scala:483)
  akka.stream.impl.PhasedFusingActorMaterializer.materialize(PhasedFusingActorMaterializer.scala:483)
  akka.stream.impl.PhasedFusingActorMaterializer.materialize(PhasedFusingActorMaterializer.scala:424)
  akka.stream.impl.PhasedFusingActorMaterializer.materialize(PhasedFusingActorMaterializer.scala:415)
  akka.stream.scaladsl.RunnableGraph.run(Flow.scala:439)
  akka.stream.scaladsl.Source.runWith(Source.scala:83)
  anorm.AkkaStreamSpec.run$1(AkkaStreamSpec.scala:43)
  anorm.AkkaStreamSpec.$anonfun$new$26(AkkaStreamSpec.scala:67)
  anorm.AkkaStreamSpec$$Lambda$664/60669686.apply(Unknown Source)
  anorm.AkkaStreamSpec.$anonfun$new$25(AkkaStreamSpec.scala:67)
  anorm.AkkaStreamSpec$$Lambda$647/220505170.apply(Unknown Source)
  akka.stream.contrib.TestKit$.assertAllStagesStopped(TestKit.scala:29)
  anorm.AkkaStreamSpec.$anonfun$new$24(AkkaStreamSpec.scala:66)
  anorm.AkkaStreamSpec$$Lambda$634/1871985180.apply(Unknown Source)
@johanandren
Copy link
Member

assertAllStagesStopped relies on internals (which has changed with the new materializer in 2.5), it was copied here from Akka core 2.4. Was it not available as a public testkit method in the 2.4 branch or why was it copied?

@cchantep
Copy link
Contributor Author

It was extracted, as useful, and no longer works

@johanandren
Copy link
Member

Yeah, but why didn't we just use the one from the akka-streams-teskit instead of copying the sources?

@johanandren
Copy link
Member

Ok, verified, it wasn't in the test kit in 2.4 that's why. Workaround would be to use the test kit one when building against 2.5, but that requires source changes and then it wouldn't work with 2.4.

@cchantep
Copy link
Contributor Author

@cchantep
Copy link
Contributor Author

Any news there? For now updating Akka Stream would need to remove .assertAllStagesStopped from test coverage (which is unfortonate, at least)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants