Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Investigate xUnit "non-serializable data" warnings #2509

Closed
mikeharder opened this issue Apr 20, 2018 · 2 comments
Closed

Investigate xUnit "non-serializable data" warnings #2509

mikeharder opened this issue Apr 20, 2018 · 2 comments
Assignees
Milestone

Comments

@mikeharder
Copy link
Contributor

Kestrel tests have hundrends of this scary-looking warning from xunit:

[12:02:22] : [Step 4/7]   [xUnit.net 00:00:00.3409135] Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests: Non-serializable data
('System.Object[]') found for 'Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Tests.LibuvTransportTests.TransportCanBindUnbindAndStop';
falling back to single test case.

http://aspnetci/viewLog.html?buildId=451476&tab=buildLog&buildTypeId=Lite_KestrelHttpServer&logTab=tree&filter=all&_focus=847#_state=350

They started when xUnit diagnostics messages were enabled (#2505). We should investigate what's causing these warnings, what is their implication (does it mean less tests are run than expected), and how to fix them.

@mikeharder mikeharder added this to the 2.2.0-mq milestone Apr 20, 2018
@mikeharder mikeharder self-assigned this Apr 20, 2018
@JamesNK
Copy link
Member

JamesNK commented Apr 21, 2018

It's caused by non-serializable parameters in xunit tests. SignalR had the same thing - aspnet/SignalR#1649

All tests are still run, you just don't see them as there own nodes in the VS test explorer.

mikeharder added a commit that referenced this issue Apr 25, 2018
- xUnit diagnostic messages were enabled in #2505 to help identify hung tests
- However, this also enables log messages for non-serializable theory data (#2509), which adds noise to logs
- It doesn't seem possible to disable the "non-serializable data" messages but keep the "long-running test" messages
- Converting all tests to serializable theory data is expensive and complicates test code
- The best solution for now is to revert xUnit diagnostic messages to disabled, and re-enable when needed to identify hung tests
@mikeharder
Copy link
Contributor Author

Partial fix at #2520. Decided the fix was getting too complicated and it would be better to just disable xUnit diagnostic messages.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants