Skip to content
This repository has been archived by the owner on Apr 11, 2022. It is now read-only.

timeout exception after update to 1.0.0 when using timeoutExitValue=0 #30

Open
yanns opened this issue Oct 10, 2014 · 2 comments
Open

Comments

@yanns
Copy link

yanns commented Oct 10, 2014

After having update from 1.0.0-M1 to 1.0.0, I receive timeout exception when using js-engine.

The change:
yanns/play-react@aa1098d#diff-fdc3abdfd754eeb24090dbd90aeec2ceR12

Error:

[application-akka.actor.default-dispatcher-6] [akka://application/user/engine-196] Message [akka.actor.Terminated] from Actor[akka://application/user/engine-196/stderr#-264922344] to Actor[akka://application/user/engine-196#1741387420] was not delivered. [2] dead letters encountered. This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'
@yanns
Copy link
Author

yanns commented Oct 10, 2014

It works again when I remove the timeoutExitValue = 0 argument
yanns/play-react@aa1098d#diff-2bc81ddbaac9248c65583b4697ee54faR80

@yanns
Copy link
Author

yanns commented Oct 10, 2014

A test to reproduce the error:

      val system = ActorSystem()

      val f = new File(classOf[TriremeSpec].getResource("test-node.js").toURI)
      implicit val timeout = Timeout(5000L, TimeUnit.MILLISECONDS)

      val engine1 = system.actorOf(Trireme.props(), s"trireme-${UUID.randomUUID().toString}")
      val futureResult1 = (engine1 ? Engine.ExecuteJs(f, immutable.Seq("999"), timeout.duration, 0)).mapTo[JsExecutionResult]

      val engine2 = system.actorOf(Trireme.props(), s"trireme-${UUID.randomUUID().toString}")
      val futureResult2 = (engine2 ? Engine.ExecuteJs(f, immutable.Seq("999"), timeout.duration, 0)).mapTo[JsExecutionResult]

      val result1 = Await.result(futureResult1, timeout.duration)
      new String(result1.output.toArray, "UTF-8").trim must_== "999"
      new String(result1.error.toArray, "UTF-8").trim must_== ""

      val result2 = Await.result(futureResult2, timeout.duration)
      new String(result2.output.toArray, "UTF-8").trim must_== "999"
      new String(result2.error.toArray, "UTF-8").trim must_== ""

(to add in TriremeSpec)

The error does not occur every time.

@yanns yanns changed the title timeout exception after update to 1.0.0 timeout exception after update to 1.0.0 when using timeoutExitValue=0 Oct 10, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant