Tuesday, November 15, 2016 [Tweets] [Favorites]

Testing Actions Over Time

Matt Gallagher:

I’ll show a way to test events scheduled over time, threads and other execution contexts with a DebugContextCoordinator that functions as a basic task scheduler but operates over a simulated version of time so that testing of invocation times and task interaction can be precise and free from changes due to host activity.

[…]

Now that libdispatch is replaced by the more flexible Exec, we can use the flexibility to schedule events with something other than libdispatch.

[…]

The advantage with using a DebugContext and DebugContextCoordinator to handle timing is that you’re no longer dependent on the actual timing information from the host machine, leading to greater precision and greater reliablility in testing.

Comments

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment