Build/Test Issues

CLI Suddenly Creates New Workspace at End of Tests

Started by jbarket on 4,802 views

I'm having some weird issues with the CLI on our build server. About 1/3 of the time, things work just fine. For most of the builds, however, it builds the projects, runs the test suite, and then ends like this:

2017-03-28T22:02:50.8568930Z [22:02:50.8568-Core-20] Successfully completed execution of 1 tests on local machine
2017-03-28T22:02:53.5755992Z [22:02:53.4974-?-1] Reporting engine execution results
2017-03-28T22:02:53.6693496Z [22:02:53.6068-LocalBuildTask-32] Building new workspace C:\Windows\ServiceProfiles\NetworkService\AppData\Local\NCrunch\3100\5 for component DataVault.Tests in context of grid client (local)
2017-03-28T22:02:53.6693496Z [22:02:53.6693-?-1] Shutting down engine
2017-03-28T22:02:53.8412027Z [22:02:53.6693-Core-34] Queuing 60 tests for passive execution
2017-03-28T22:02:53.8412027Z [22:02:53.6849-LocalBuildTask-32] Now building DataVault.Tests
2017-03-28T22:02:53.8412027Z [22:02:53.8255-LocalBuildTask-32] The build task runner process has been terminated.
2017-03-28T22:02:53.8412027Z [22:02:53.8255-Core-34] Cleaning up workspace: C:\Windows\ServiceProfiles\NetworkService\AppData\Local\NCrunch\3100\4
2017-03-28T22:02:54.2162022Z [22:02:54.1849-Core-34] Cleaning up workspace: C:\Windows\ServiceProfiles\NetworkService\AppData\Local\NCrunch\3100\3
2017-03-28T22:02:54.2162022Z [22:02:54.1849-Core-34] Cleaning up workspace: C:\Windows\ServiceProfiles\NetworkService\AppData\Local\NCrunch\3100\2
2017-03-28T22:02:54.2162022Z [22:02:54.2005-Core-34] Cleaning up workspace: C:\Windows\ServiceProfiles\NetworkService\AppData\Local\NCrunch\3100\1
2017-03-28T22:02:56.8724139Z [22:02:56.8724-?-1] Returning result: TestsNotRun

It's like it tries to start running again immediately on completion, then returns that the tests weren't run because that run never happens.

Any ideas? This is in a .NET Core project.
Hi, thanks for sharing this problem.

My first guess here would be that there has been a file system change in the solution being targeted by the console tool. Perhaps as a result of the execution run itself. This then triggers NCrunch's file synchroniser which in turn causes the engine to adapt to the change and re-queue the tests.

Do you have any code running in your solution that might somehow change files in the foreground solution by reaching out of the NCrunch workspace? It might be possible to see which files are being changed by setting your log verbosity to 'Detailed'. The log will usually report file system changes that the engine responds to.
Thanks for the quick reply. I'm pretty sure it's something in the build that was doing it, and it was just a timing issue of whether it bothered NCrunch or not. Moved some build steps around this morning and it hasn't happened since.

Post a reply

Log in to reply.