{"id":16383,"date":"2016-11-15T13:33:51","date_gmt":"2016-11-15T18:33:51","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=16383"},"modified":"2016-11-15T13:33:51","modified_gmt":"2016-11-15T18:33:51","slug":"testing-actions-over-time","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2016\/11\/15\/testing-actions-over-time\/","title":{"rendered":"Testing Actions Over Time"},"content":{"rendered":"<p><a href=\"https:\/\/www.cocoawithlove.com\/blog\/testing-actions-over-time.html\">Matt Gallagher<\/a>:<\/p>\n<blockquote cite=\"https:\/\/www.cocoawithlove.com\/blog\/testing-actions-over-time.html\">\n<p>I&rsquo;ll show a way to test events scheduled over time, threads and other execution contexts with a <code>DebugContextCoordinator<\/code> 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.<\/p>\n<p>[&#8230;]<\/p>\n<p>Now that libdispatch is replaced by the more flexible <code>Exec<\/code>, we can use the flexibility to schedule events with something other than libdispatch.<\/p>\n<p>[&#8230;]<\/p>\n<p>The advantage with using a <code>DebugContext<\/code> and <code>DebugContextCoordinator<\/code> to handle timing is that you&rsquo;re no longer dependent on the actual timing information from the host machine, leading to greater precision and greater reliablility in testing.<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Matt Gallagher: I&rsquo;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. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[800,31,30,71,901,268],"class_list":["post-16383","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-concurrency","tag-ios","tag-mac","tag-programming","tag-swift-programming-language","tag-testing"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/16383","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=16383"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/16383\/revisions"}],"predecessor-version":[{"id":16384,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/16383\/revisions\/16384"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=16383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=16383"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=16383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}