Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@gmethvin
Copy link
Member

Backports #5984 and #6048.

@gmethvin gmethvin added this to the 2.5.3 milestone Apr 16, 2016
@marcospereira
Copy link
Member

Hey @gmethvin, build is broken:

https://travis-ci.org/playframework/playframework/jobs/123501044#L2551

If I recall correctly, this is the same test that broke when I've tried to upgrade Play 2.5.x to Akka 2.4.3 (not sure though).

@gmethvin
Copy link
Member Author

@marcospereira Yes, I think it is the same test. It passed on master because we removed WebSocket.acceptWithActor, which is what's being tested there. But it could be caused by a legit bug either in Play or in Akka.

@gmethvin
Copy link
Member Author

Actually, something might be broken on master as well. If I update that test to:

"close when the consumer is done" in closeWhenTheConsumerIsDone { implicit app =>
  import app.materializer
  implicit val as = app.actorSystem
  WebSocket.accept[String, String] { req =>
    ActorFlow.actorRef { out =>
      Props(new Actor() {
        out ! Status.Success(())
        def receive = PartialFunction.empty
      })
    }
  }
}

it still fails, so it has nothing to do with the deprecated methods. Those tests should probably have been updated on master to use ActorFlow rather than removed.

@schmitch
Copy link
Contributor

Looks like its a timeout issue: https://travis-ci.org/playframework/playframework/jobs/123505529#L2597

out =>
Props(new Actor() {
out ! Status.Success(())
app.actorSystem.scheduler.scheduleOnce(10.millis, out, Status.Success(()))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the test failure. I suspect the actor is being terminated before the client actually connects to it, so the client is never able to receive the close message. Adding a small delay gives the client enough time to connect. I'm not sure if this was supposed to work before, though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious to know how did you figured this out. :-)

Copy link
Member Author

@gmethvin gmethvin Apr 16, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it's clear the timeout is because the the client never gets the close frame. So one situation I could think of where that would happen is if the client wasn't connected yet, since the message is being sent when the actor is initialized (probably not a realistic situation anyway...).

@marcospereira
Copy link
Member

Those tests should probably have been updated on master to use ActorFlow rather than removed.

Makes sense to me. Looks like ActorFlow is untested.

@marcospereira marcospereira merged commit 9e57b95 into playframework:2.5.x Apr 16, 2016
@gmethvin gmethvin deleted the akka-backport branch April 28, 2016 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants