Git Product home page Git Product logo

Comments (1)

BenjaminMichaelis avatar BenjaminMichaelis commented on August 11, 2024

A copy of the failure:

Test run for /home/runner/work/EssentialCSharp/EssentialCSharp/src/Chapter20.Tests/bin/Debug/netcoreapp3.1/Chapter20.Tests.dll (.NETCoreApp,Version=v3.1)
Microsoft (R) Test Execution Command Line Tool Version 17.2.0 (x64)
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
  Failed AsyncVoidReturnTest [34 ms]
  Error Message:
   Test method AddisonWesley.Michaelis.EssentialCSharp.Chapter20.Listing20_09.Tests.ProgramTests.AsyncVoidReturnTest threw exception: 
System.Exception: The values are not like (using wildcards) each other:- 
-----------------------------------
Expected: "Invoking Task.Run...(Thread ID: *)\nRunning task... (Thread ID: *)\nPost notification invoked...(Thread ID: *)\nPost notification invoked...(Thread ID: *)\nThrowing expected exception....(Thread ID: *)\nSystem.Exception: Expected Exception\n   *(Thread ID: *)"
Actual  : "Invoking Task.Run...(Thread ID: 4)\nRunning task... (Thread ID: 10)\nPost notification invoked...(Thread ID: 4)\nThrowing expected exception....(Thread ID: 4)\nSystem.Exception: Expected Exception\n   at AddisonWesley.Michaelis.EssentialCSharp.Chapter20.Listing20_09.Program.<>c.<OnEvent>b__6_0() in /home/runner/work/EssentialCSharp/EssentialCSharp/src/Chapter20/Listing20.09.CatchingExceptionFromAsyncVoidMethod.cs:line 106\n   at System.Threading.Tasks.Task`1.InnerInvoke()\n   at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)\n   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)\n--- End of stack trace from previous location where exception was thrown ---\n   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)\n   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)\n--- End of stack trace from previous location where exception was thrown ---\n   at AddisonWesley.Michaelis.EssentialCSharp.Chapter20.Listing20_09.Program.OnEvent(Object sender, EventArgs eventArgs) in /home/runner/work/EssentialCSharp/EssentialCSharp/src/Chapter20/Listing20.09.CatchingExceptionFromAsyncVoidMethod.cs:line 101\n   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_0(Object state)\n   at AddisonWesley.Michaelis.EssentialCSharp.Chapter20.Listing20_09.AsyncSynchronizationContext.Post(SendOrPostCallback callback, Object state) in /home/runner/work/EssentialCSharp/EssentialCSharp/src/Chapter20/Listing20.09.CatchingExceptionFromAsyncVoidMethod.cs:line 40\n--- End of stack trace from previous location where exception was thrown ---\n   at AddisonWesley.Michaelis.EssentialCSharp.Chapter20.Listing20_09.Program.Main() in /home/runner/work/EssentialCSharp/EssentialCSharp/src/Chapter20/Listing20.09.CatchingExceptionFromAsyncVoidMethod.cs:line 81 thrown as expected.(Thread ID: 4)"
-----------------------------------
The expected length of 253 does not match the output length of 2055. 
  Stack Trace:
      at IntelliTect.TestTools.Console.ConsoleAssert.AssertExpectation(String expectedOutput, String output, Func`3 areEquivalentOperator, String equivalentOperatorErrorMessage)
   at IntelliTect.TestTools.Console.ConsoleAssert.Execute(String givenInput, String expectedOutput, Action action, Func`3 areEquivalentOperator, NormalizeOptions normalizeOptions, String equivalentOperatorErrorMessage)
   at IntelliTect.TestTools.Console.ConsoleAssert.Expect(String expected, Action action, Func`3 comparisonOperator, NormalizeOptions normalizeOptions, String equivalentOperatorErrorMessage)
   at IntelliTect.TestTools.Console.ConsoleAssert.ExpectLike(String expected, Action action, NormalizeOptions normalizeLineEndings, Char escapeCharacter)
   at AddisonWesley.Michaelis.EssentialCSharp.Chapter20.Listing20_09.Tests.ProgramTests.AsyncVoidReturnTest() in /home/runner/work/EssentialCSharp/EssentialCSharp/src/Chapter20.Tests/Listing20.09.ImplementingCustomAsynchronousMethod.Tests.cs:line 21


Failed!  - Failed:     1, Passed:    24, Skipped:     0, Total:    25, Duration: 7 s - /home/runner/work/EssentialCSharp/EssentialCSharp/src/Chapter20.Tests/bin/Debug/netcoreapp3.1/Chapter20.Tests.dll (netcoreapp3.1)

from essentialcsharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.