File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
scalatest/src/main/scala/org/scalatest/concurrent
scalatest-test/src/test/scala/org/scalatest/concurrent Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -201,7 +201,7 @@ class UltimatelySpec extends AsyncFunSpec with Matchers with OptionValues {
201
201
}
202
202
}
203
203
} map { _ =>
204
- (System .currentTimeMillis - startTime.get).toInt should be >= (1388 )
204
+ (System .currentTimeMillis - startTime.get).toInt should be >= (1388 - 10 ) // - 10 to give it a little wiggle room
205
205
}
206
206
}
207
207
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import org.scalatest.exceptions.StackDepthException
26
26
import scala .concurrent .{Future , Promise , ExecutionContext }
27
27
import scala .util .{Success , Failure }
28
28
import java .util .concurrent .{ Executors , TimeUnit , ThreadFactory }
29
+ import java .util .concurrent .ScheduledExecutorService
29
30
30
31
/**
31
32
* Trait that provides the <code>ultimately</code> construct, which periodically retries executing
@@ -504,7 +505,7 @@ trait Ultimately extends PatienceConfiguration {
504
505
* </pre>
505
506
*/
506
507
object Ultimately extends Ultimately {
507
- private lazy val scheduler = {
508
+ private lazy val scheduler : ScheduledExecutorService = {
508
509
val threadFactory = new ThreadFactory {
509
510
val inner = Executors .defaultThreadFactory()
510
511
def newThread (runnable : Runnable ) = {
You can’t perform that action at this time.
0 commit comments