1

The title pretty much says it all; I've got some myget builds failing during the unit test project.

This is the link to the build log on Myget: https://www.myget.org/BuildSource/List/filemaker#19f57648-9fb3-4550-ba06-b400e7d75ecc

MyGet Log Snip:

Starting test execution, please wait...
[xUnit.net 00:00:00.5400101]   Discovering: FMData.Tests
[xUnit.net 00:00:00.6264854]   Discovered:  FMData.Tests
[xUnit.net 00:00:00.6318313]   Starting:    FMData.Tests
[Error] Error during build: The process has been killed because the maximum allowed working time of 15 minutes was exceeded.
Destroying git credential provider...
[Error] Error while running finalizing build steps: The process has been killed because the maximum allowed working time of 15 minutes was exceeded.
Cleaning up build environment...
Cleaning up sources...

The actual code for the project and the unit tests can be found here https://github.com/fuzzzerd/fmdata.

Running locally via dotnet test nets me this:

Starting test execution, please wait...
[xUnit.net 00:00:00.7681456]   Discovering: FMData.Tests
[xUnit.net 00:00:00.9135692]   Discovered:  FMData.Tests
[xUnit.net 00:00:00.9193997]   Starting:    FMData.Tests
[xUnit.net 00:00:01.1856516]   Finished:    FMData.Tests

Total tests: 8. Passed: 8. Failed: 0. Skipped: 0.
Test Run Successful.
Test execution time: 2.6027 Seconds

As mentioned the unit tests run locally in 5-10 seconds; this is a very small project with very few dependencies, but something is clearly conflicting, but I'm not sure how to debug the myget build services or even find out if I have somehow incorrectly setup my unit test project.

Is there a way to turn on advanced/verbose logging? Right now I don't know if its a myget issue, a project issue, or a specific test that is causing problems here.

Nate
  • 30,286
  • 23
  • 113
  • 184
  • FWIW: If I remove the test project from the build; it works and publishes the package to the feed. It seems to be something specific to the test project or the tests. – Nate Apr 13 '18 at 18:15
  • 1
    Since you have a multi-target project, is it possible the failure is related to `net451`? I think `dotnet test` will just run for the first framework listed (`netstandard1.3` in your case). You'd have to run (locally) `dotnet test --framework net451` to run xunit against the .NET Framework. – McGuireV10 Apr 13 '18 at 19:41
  • @McGuireV10 thanks for checking. I removed the .NET Framework target, and I'm still getting a similar situation running the tests on the build server just hangs. The only thing I can think of is that I'm using this package: https://github.com/richardszalay/mockhttp – Nate Apr 13 '18 at 20:17
  • I've reproduced this behavior on appveyor build services now as well. – Nate Apr 13 '18 at 20:18
  • 1
    It seems to be related to xunit running the tests in parallel. Adding this to the test assembly `[assembly: CollectionBehavior(DisableTestParallelization = true)]` seems to allow it to work in all CI environments; it runs locally without any problems though. Leaving open as I'm not sure WHY the parallelization matters. – Nate Apr 16 '18 at 14:53

0 Answers0