Skip to content

Commit

Permalink
Try to make the ExternalTerminalTest more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Jun 22, 2017
1 parent 6962db9 commit d5695a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public void run() {
outIn.flush();
Thread.sleep(50);
outIn.write(3);
Thread.sleep(50);
outIn.write('c');
outIn.flush();
Thread.sleep(50);
Expand Down
3 changes: 3 additions & 0 deletions terminal/src/main/java/org/jline/utils/NonBlockingReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ else if (!isPeek && timeout <= 0L && !threadIsReading) {
long start = System.currentTimeMillis ();

try {
if (Thread.interrupted()) {
throw new InterruptedException();
}
wait(timeout);
}
catch (InterruptedException e) {
Expand Down

0 comments on commit d5695a1

Please sign in to comment.