Timeout in DotNet Test action

Hi,

I am migrating my project from .NET Framework to .NET Core, and this requires me to switch from the NUnit CLI test runner (NUnit action) to the DotNet Test action. Mostly this is working ok, but I am experiencing a timeout error, probably related to a single test that is computationally intensive and takes a long time (minutes) to run. The timeout on the DotNet Test action is set to zero, which should default to 24hrs as per the docs. Explicitly setting the action timeout to a large value has no effect. It appears that there is another independent timeout in the test output file reader.

Please let me know if there is anything else I can do to assist in fixing this.

Cheers,
Stu

The error is:

Action 'DotNet Test [######.######.Tests]' has timed out as there was no response for 1m 0s 0ms. Process was running for 2m 44s 175ms in total. 
An error occurred while parsing unit test results output.
Exception: SteppingException
Message: An error occurred while parsing report file: C:\Users\ContinuaCI\AgentWorkspace\Ws\16273\Output\TestResults\__ci_test_results_build16273_######.######.Tests.dll.xml
Stack Trace:    at Continua.Modules.Builds.Actions.UnitTest.UnitTestParserHelperBase.Parse(IBuildSteppingContext context)    at Continua.Modules.Builds.Actions.DotNetTestAction.OnInterpretResult(IBuildSteppingContext context, String commandName, Int32 exitCode, String consoleOutput)
Exception: XmlException
Message: Unexpected end of file has occurred. The following elements are not closed: message, testCase, testSuite, testResults. Line 183, position 106.
Stack Trace:    at System.Xml.XmlTextReaderImpl.Throw(Exception e)    at System.Xml.XmlTextReaderImpl.ThrowUnclosedElements()    at System.Xml.XmlTextReaderImpl.ParseElementContent()    at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)    at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)    at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)    at Continua.Modules.Builds.Actions.UnitTest.DotNetTestParserHelper.ParseReport(IBuildSteppingContext context)    at Continua.Modules.Builds.Actions.UnitTest.UnitTestParserHelperBase.Parse(IBuildSteppingContext context)

Hi @stuy,

There is an additional No Output Timeout which happens if there is no output from an action. Generally this defaults to be the same as the Timeout value and can only currently be changed in the Azure actions.

After one user reported that their unit test action was frozen due to a UI prompt in a test, we decided to set the No Output Timeout to 60 seconds for the DotNet Test action unless Verbosity was set to Quiet, not expecting anyone to have unit tests which run without output for longer than this period.

We have now updated the action to allow the No Output Timeout to be configured.

You can download a hotfix using the following links:

1 Like

Thank you! I can confirm that works and I have my first successful netcore CI build!

1 Like