<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>XCTest on The Dangling Pointer</title><link>https://aaron.blog/tags/xctest/</link><description>Recent content in XCTest on The Dangling Pointer</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 06 Aug 2014 19:52:11 +0000</lastBuildDate><atom:link href="https://aaron.blog/tags/xctest/index.xml" rel="self" type="application/rss+xml"/><item><title>Asynchronous unit testing Core Data with Xcode 6</title><link>https://aaron.blog/asynchronous-unit-testing-core-data-with-xcode-6/</link><pubDate>Wed, 06 Aug 2014 19:52:11 +0000</pubDate><guid>https://aaron.blog/asynchronous-unit-testing-core-data-with-xcode-6/</guid><description>&lt;p&gt;The &lt;a href="http://github.com/wordpress-mobile/WordPress-iOS" rel="noopener"&gt;WordPress for iOS&lt;/a&gt; project had a number of unit tests using Core Data and a custom asynchronous test helper.  The helper used a semaphore in a global scope and a bit of method swizzling to give a wait/notify mechanism.  The problem with this solution was the global semaphore and poorly written tests causing a conflict.  Tests would call the ending wait and previous tests running Core Data would fire off notifies causing a mismatch between the original test and the recipient of the message to pass by the current semaphore.&lt;/p&gt;</description></item></channel></rss>