Created
August 28, 2015 13:47
-
-
Save SRGOM/c10d65f05f44a393d701 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"xyz" should "abc" in { | |
val delayTime = 20 | |
setTimeout( () => delayer.execute( (2, new Date ) ), delayTime ) | |
//Mark the test as complete | |
val testCompletePromise = Promise[ Boolean ]() | |
setTimeout( () => { | |
testCompletePromise.success( true ) | |
} , delayTime * 4 ) | |
println( Console.GREEN + "During run: " + new Date ) | |
testCompletePromise.future map{ | |
_x => { | |
assert( executionList.size == 3 ) | |
assert( executionList.map( _.callId ).sum == 6 ) | |
assert( executionList.map( e => if( e.executionTime - e.callTime > delayTime ) 1 else 0 ).sum == 3 ) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment