Comments (1)
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)
- Investigate why build failure is occurring only on mac HOT 2
- Run tests with different locales HOT 2
- TFM moved from Directory.Build.props to each csproj file
- To go to new lang version of the book...
- Revisit 20.7 to make work properly HOT 1
- Delete ../src/Chapter01/Directory.Build.props HOT 1
- Update Directory.Build.props to use C# 11.0 for LangVersion element (once released) HOT 1
- Rename v9.0 Branch? HOT 2
- Testing 10.23 doesn't complete reliably especially
- Update Readme File
- Find an alternate location (or delete) Publishing a Stand-Alone Executable - Advanced Block HOT 1
- Switch the CompileError class in CompilerAssert.cs to be a record HOT 1
- Switch expected strings from string literals to RAW literals in unit tests HOT 1
- Add support for method filtering to ...\src\Shared\Tests\CompilerAssert.cs HOT 1
- Write Unit Tests for Table.03.01 HOT 1
- Move Microsoft.VisualStudio.TestTools.UnitTesting using statement into Chapter.Tests.prop
- Create tests for Table03.01
- Create Table04.01.ControlFlowStatements.cs and accompanying tests
- Write test for Listing04.27.OutOfScope.cs using CompilerAssert.cs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from essentialcsharp.