Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Error message: ERROR (Internal): System.Exception: Failed to extract test from its task
ljohnston
#1 Posted : Thursday, August 16, 2018 12:00:18 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 1/17/2014(UTC)
Posts: 31

Thanks: 17 times
Was thanked: 5 time(s) in 5 post(s)
Hi,

I had a build fail with the error message below and would like some help troubleshooting it since it seems to be an internal NCrunch error message.

The tests are being run from TeamCity using NCrunch Console v3.18.0.2.

Re-running the build fixed the issue, but obviously it would be better if it didn't fail in the first place.

Here's what seems like the relevant excerpt from the TeamCity log, please let me know if there's any other info you'd like to help with troubleshooting it. It seems like after the failure it went on to run the rest of the tests without issue.

Code:
[14:52:18] :	 [Step 2/3] [LocalTestExecutionTask-140] Calling into task runner to run 3 tests: 
[14:52:18] :	 [Step 2/3] [LocalTestExecutionTask-140]       Sepialine.Argos.Commons.AspNetWebApi.Tests.WebServiceBaseUrlSpecs.when_representing_url_to_listen_on.should_represent
[14:52:18] :	 [Step 2/3] [LocalTestExecutionTask-140]       Sepialine.Argos.Commons.AspNetWebApi.Tests.WebServiceBaseUrlSpecs.when_representing_url_with_host_name.should_represent
[14:52:18] :	 [Step 2/3] [LocalTestExecutionTask-140]       Sepialine.Argos.Commons.AspNetWebApi.Tests.WebServiceBaseUrlSpecs.when_representing_url_with_ip.should_represent
[14:52:18] :	 [Step 2/3] [LocalBuildTask-365] Build was successful for C:\NCrunch\work\13360\9\BusinessObjects\BusinessObjects\bin\Release\BusinessObjects.dll
[14:52:18] :	 [Step 2/3] NCrunch build: BusinessObjects
[14:52:18] :	 [Step 2/3] [LocalBuildTask-301] Building new workspace C:\NCrunch\work\13360\24 for component Commons.Coordination in context of grid client (local)
[14:52:18] :	 [Step 2/3] [Core-275] Queuing 20 tests for passive execution
[14:52:18] :	 [Step 2/3] [Core-275] Queuing 15 tests for passive execution
[14:52:18] :	 [Step 2/3] [Core-275] Queuing 17 tests for passive execution
[14:52:18] :	 [Step 2/3] [Core-275] Queuing 5 tests for passive execution
[14:52:18] :	 [Step 2/3] [Core-275] Queuing 110 tests for passive execution
[14:52:18] :	 [Step 2/3] [Core-275] ERROR (Internal): System.Exception: Failed to extract test from its task
[14:52:18] :	 [Step 2/3] [Core-275]    at nCrunch.Client.TestPipeline.TestPipelineBuilder.RemoveTestsFromQueue(HashSet`1 testsToRemove, Boolean considerGridNode, GridNodeId gridNodeId, Boolean removeFromProcessedTasks)
[14:52:18] :	 [Step 2/3] [Core-275]    at nCrunch.Client.TestPipeline.TestPipelineBuilder.RemoveTestsFromQueue(IList`1 testsToRemove, Boolean considerGridNode, GridNodeId gridNodeId)
[14:52:18] :	 [Step 2/3] [Core-275]    at nCrunch.Client.TestPipeline.TestPipelineBuilder.QueueTestsForExecution(SnapshotComponent component, IList`1 testsToExecute, Boolean useDebugger, GridNodeId nodeToExecuteOn, Boolean executeWithHighPriority, ITaskGenerationModifier priorityCalculator, PerfTracker perfTracker)
[14:52:18] :	 [Step 2/3] [Core-275]    at nCrunch.Client.TestPipeline.TestPipelineManager. . ()
[14:52:18] :	 [Step 2/3] [Core-275]    at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
[14:52:18] :	 [Step 2/3] [Core-275]    at nCrunch.Client.TestPipeline.TestPipelineManager. (IEnumerable`1  , DateTime  )
[14:52:18] :	 [Step 2/3] [Core-275]    at nCrunch.Client.TestPipeline.TestPipelineManager. (TestResultsOutdatedEvent  )

[14:51:36]E:	 [Step 2/3] Failed to extract test from its task - System.Exception: Failed to extract test from its task
   at nCrunch.Client.TestPipeline.TestPipelineBuilder.RemoveTestsFromQueue(HashSet`1 testsToRemove, Boolean considerGridNode, GridNodeId gridNodeId, Boolean removeFromProcessedTasks)
   at nCrunch.Client.TestPipeline.TestPipelineBuilder.RemoveTestsFromQueue(IList`1 testsToRemove, Boolean considerGridNode, GridNodeId gridNodeId)
   at nCrunch.Client.TestPipeline.TestPipelineBuilder.QueueTestsForExecution(SnapshotComponent component, IList`1 testsToExecute, Boolean useDebugger, GridNodeId nodeToExecuteOn, Boolean executeWithHighPriority, ITaskGenerationModifier priorityCalculator, PerfTracker perfTracker)
   at nCrunch.Client.TestPipeline.TestPipelineManager. . ()
   at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
   at nCrunch.Client.TestPipeline.TestPipelineManager. (IEnumerable`1  , DateTime  )
   at nCrunch.Client.TestPipeline.TestPipelineManager. (TestResultsOutdatedEvent  )
[14:52:18]i:	 [Step 2/3] ##teamcity[buildProblem description='Failed to extract test from its task - System.Exception: Failed to extract test from its task|r|n   at nCrunch.Client.TestPipeline.TestPipelineBuilder.RemoveTestsFromQueue(HashSet`1 testsToRemove, Boolean considerGridNode, GridNodeId gridNodeId, Boolean removeFromProcessedTasks)|r|n   at nCrunch.Client.TestPipeline.TestPipelineBuilder.RemoveTestsFromQueue(IList`1 testsToRemove, Boolean considerGridNode, GridNodeId gridNodeId)|r|n   at nCrunch.Client.TestPipeline.TestPipelineBuilder.QueueTestsForExecution(SnapshotComponent component, IList`1 testsToExecute, Boolean useDebugger, GridNodeId nodeToExecuteOn, Boolean executeWithHighPriority, ITaskGenerationModifier priorityCalculator, PerfTracker perfTracker)|r|n   at nCrunch.Client.TestPipeline.TestPipelineManager. . ()|r|n   at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)|r|n   at nCrunch.Client.TestPipeline.TestPipelineManager. (IEnumerable`1  , DateTime  )|r|n   at nCrunch.Client.TestPipeline.TestPipelineManager. (TestResultsOutdatedEvent  )' timestamp='2018-08-15T14:52:18.299-0700']
[14:52:18] :	 [Step 2/3] [Core-275] Successfully completed execution of 3 tests on local machine
Remco
#2 Posted : Thursday, August 16, 2018 12:44:10 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for sharing this issue.

We've had this recently appear on our own build too. It seems to be caused by a complex series of rare interactions around the test pipeline and in the cases where I've been able to pin it down, it's been related to tests being added or removed to NCrunch's in-memory model. The problem looks to have been there for quite a while (years probably).

There's a fix coming for this in the next release. I expect that you likely won't see this again (it should be very rare). If it's repeating for you, try clearing out the NCrunch cache file on your build machine.

The result of this issue is that there may be a few tests that are not included in the run and won't be reported in the results.
Remco
#3 Posted : Sunday, August 26, 2018 11:14:54 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
1 user thanked Remco for this useful post.
ljohnston on 8/27/2018(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.034 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download