Permalink
Browse files

[backport] relax time constraint in duration-tck.scala (for Windows VMs)

(cherry picked from commit 3e0fbc0)
  • Loading branch information...
1 parent e3c3186 commit da1ae7adaff303617df9bac41331b78d5b1ff11b @rkuhn rkuhn committed with retronym Feb 25, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 test/files/jvm/duration-tck.scala
@@ -176,8 +176,9 @@ object Test extends App {
Thread.sleep(1.second.toMillis)
- { val l = dead.timeLeft; assert(l <= 1.second, s"$l > 1.second") }
- { val l = dead2.timeLeft; assert(l <= 1.second, s"$l > 1.second") }
+ // unfortunately it can happen that the sleep() returns early without throwing
+ { val l = dead.timeLeft; assert(l <= 1100.millis, s"$l > 1100.millis") }
+ { val l = dead2.timeLeft; assert(l <= 1100.millis, s"$l > 1100.millis") }
// test integer mul/div

0 comments on commit da1ae7a

Please sign in to comment.