سؤال

What would cause Xcode to think that a test hasn't completed?

I've got a number of unit tests for a multi-threaded component (using GCD) where the test completes but Xcode takes another couple minutes or so to recognize that the test has actually completed.

I know the test has completed because the following text is displayed in the debug console:

Test Suite 'Multiple Selected Tests' finished at 2014-05-06 00:45:56 +0000.
Executed 1 test, with 0 failures (0 unexpected) in 1.249 (1.258) seconds
Program ended with exit code: 0

I can debug the test and the component just fine but when I continue at the end of my code, it takes another couple minutes or so before Xcode says that the test was finished.

Any ideas what would cause this? I'm pulling my hair out.

  • OS X 10.9.2
  • Xcode 5.1.1
  • iOS Simulator for iOS 7.1

Thanks,

David

هل كانت مفيدة؟

المحلول

This turned out to be a problem of too much debug logging with NSLog. My tests use a mock NSURLProtocol and I was calling NSLog with a large amount of text. Apparently this threw a wrench in the communications link between the app and Xcode. Removing those calls to NSLog solved the problem.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top