Skip to content

Unit test fails spontanously #574

Description

@NeoCoderMatrix86

Describe the bug
The unit test "AnalyseAsync_InputfileWithExtraSeperator_CreatesValidCuesheetAsync " sometimes fails. Running it again most times works.

Exception details (if possible)

Run dotnet test
Running tests from /home/runner/work/AudioCuesheetEditor/AudioCuesheetEditor/AudioCuesheetEditor.End2EndTests/bin/Debug/net10.0/AudioCuesheetEditor.End2EndTests.dll (net10.0|x64)
Running tests from /home/runner/work/AudioCuesheetEditor/AudioCuesheetEditor/AudioCuesheetEditor.Tests/bin/Debug/net10.0/AudioCuesheetEditor.Tests.dll (net10.0|x64)
failed AnalyseAsync_InputfileWithExtraSeperator_CreatesValidCuesheetAsync (25ms)
  from /home/runner/work/AudioCuesheetEditor/AudioCuesheetEditor/AudioCuesheetEditor.Tests/bin/Debug/net10.0/AudioCuesheetEditor.Tests.dll (net10.0|x64)
  Assert.IsNull failed. 'value' expression: 'importfile.AnalyseException'.
    at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.ThrowAssertIsNullFailed(String message) in /_/src/TestFramework/TestFramework/Assertions/Assert.IsNull.cs:162
    at Microsoft.VisualStudio.TestTools.UnitTesting.Assert.IsNull(Object value, String message, String valueExpression) in /_/src/TestFramework/TestFramework/Assertions/Assert.IsNull.cs:155
    at AudioCuesheetEditor.Tests.Services.IO.TextImportServiceTests.AnalyseAsync_InputfileWithExtraSeperator_CreatesValidCuesheetAsync() in /home/runner/work/AudioCuesheetEditor/AudioCuesheetEditor/AudioCuesheetEditor.Tests/Services/IO/TextImportServiceTests.cs:142
    at Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestMethodInfo.ExecuteInternalAsync(Object[] arguments, CancellationTokenSource timeoutTokenSource) in /_/src/Adapter/MSTestAdapter.PlatformServices/Execution/TestMethodInfo.cs:397
/home/runner/work/AudioCuesheetEditor/AudioCuesheetEditor/AudioCuesheetEditor.Tests/bin/Debug/net10.0/AudioCuesheetEditor.Tests.dll (net10.0|x64) failed with 1 error(s) (912ms)
Exit code: 2
  Standard output: Test Parallelization enabled for /home/runner/work/AudioCuesheetEditor/AudioCuesheetEditor/AudioCuesheetEditor.Tests/bin/Debug/net10.0/AudioCuesheetEditor.Tests.dll (Workers: 4, Scope: MethodLevel)
/home/runner/work/AudioCuesheetEditor/AudioCuesheetEditor/AudioCuesheetEditor.End2EndTests/bin/Debug/net10.0/AudioCuesheetEditor.End2EndTests.dll (net10.0|x64) passed (3m 09s 124ms)

Test run summary: Failed!
  /home/runner/work/AudioCuesheetEditor/AudioCuesheetEditor/AudioCuesheetEditor.End2EndTests/bin/Debug/net10.0/AudioCuesheetEditor.End2EndTests.dll (net10.0|x64) passed (3m 09s 124ms)
  /home/runner/work/AudioCuesheetEditor/AudioCuesheetEditor/AudioCuesheetEditor.Tests/bin/Debug/net10.0/AudioCuesheetEditor.Tests.dll (net10.0|x64) failed with 1 error(s) (912ms)

  total: 214
  failed: 1
  succeeded: 213
  skipped: 0
  duration: 3m 09s 412ms
Test run completed with non-success exit code: 2 (see: https://aka.ms/testingplatform/exitcodes)
Error: Process completed with exit code 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreview neededThis issue needs a review (more description, maybe wrong idea)

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions