Skip to content
This repository has been archived by the owner on Jun 10, 2020. It is now read-only.

scripted tests gets stuck #32

Closed
eed3si9n opened this issue Mar 31, 2016 · 0 comments
Closed

scripted tests gets stuck #32

eed3si9n opened this issue Mar 31, 2016 · 0 comments

Comments

@eed3si9n
Copy link
Member

steps

  1. Use util 0.1.0-M9 in sbt/sbt
  2. Have some error in scripted test such that the build doesn't load

problem

The scripted gets stuck forever.

expectation

scripted comes back with error.

notes

When the build doesn't load sbt waits for the user's input using SimpleReader.readLine:

val result = (SimpleReader.readLine("Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? ") getOrElse Quit).toLowerCase(Locale.ENGLISH)

Thread sleep injection seem to interfere with this. Work around is to not to inject thread sleep by default.

eed3si9n added a commit that referenced this issue Mar 31, 2016
Thread sleeping interferes with scripted test when the build cannot be
loaded. The scripted test gets stuck, and jstack shows

    java.lang.Thread.State: TIMED_WAITING (sleeping)
      at java.lang.Thread.sleep(Native Method)
      at sbt.internal.util.InputStreamWrapper.read(LineReader.scala:138)
      at
jline.internal.NonBlockingInputStream.read(NonBlockingInputStream.java:2
45)
      ....
      at sbt.internal.util.JLine$.withJLine(LineReader.scala:118)
      at sbt.internal.util.JLine.readLine(LineReader.scala:18)
      at
sbt.BuiltinCommands$.sbt$BuiltinCommands$$doLoadFailed(Main.scala:460)
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