Tests run fails becuse test host is installing or uninstalling

Originator:matej
Number:rdar://27821239 Date Originated:12-Aug-2016 12:05 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 5b5
Classification:Other Bug Reproducible:Rarely
 
Summary:

At PSPDFKit we have a consolidated tests scheme that runs several test bundles in sequence (see image 1). We noticed that in some cases this scheme might fail between execution of the individual test bundles. There is no console log message printed and nothing that really stands on in the test log, but Xcode does show an error sheet (see image 2). 

The displayed error is as follows:

> Te request to open “com.pspdfkit.tests” failed.

> The request was denied by service delegate (SBMainWorkspace) for reason: Busy ("Application "com.pspdfkit.tests" is installing or uninstalling, and cannot be launched").

com.pspdfkit.tests is the test host for one of our test bundles (probably the next one to be executed, see image 3).

Steps to Reproduce:

We were unable to reproduce this in an isolated sample. Even in our test suite this happens rarely. 

Expected Results:

Tests would run one after another without issues.

Actual Results:

The consolidated test run can fail between individual test bundle executions. 

Regression:

So far we’ve seen this fail in Xcode only once. However, on CI where we use xcodebuild to run the test suite, we have been seeing similar sporadic failures for a while. Just like in this case, the console does not have a lot of useful information. The error is just shown in Xcode UI, which leads us to believe that the previous issues might be related. 

Notes:

In addition to the aforementioned images, I’m also attaching the console log and test referenced log.

Comments

Resources

https://cloudup.com/cQzMNjBRdtC


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!