Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wasm][tests] Identify tests that throw PNSE #313

Closed
wants to merge 1 commit into from

Conversation

radical
Copy link
Member

@radical radical commented Sep 26, 2020

  • These tests show up as

[PNSE] System.Net.Http.Functional.Tests.SocketsHttpHandler_Connect_Test.ConnectMethod_Success

And the test results show:
Tests run: 1774, Errors: 0, Failures: 13, PNSE: 1226, Skipped: 71. Time: 10.198805s

Here PNSE: shows the count for tests that throw PNSE.
And Failures do not include PNSE failures.

In the xml report, such tests are shown with result="PNSE":

<test
	name="System.Net.Http.Functional.Tests.SyncHttpHandler_Connect_Test.ConnectMethod_Success"
	type="System.Net.Http.Functional.Tests.SyncHttpHandler_Connect_Test"
	method="ConnectMethod_Success" time="0.000525"
	result="PNSE">

.. instead of result="Fail".

To detect these, we look for exception-type==PNSE .
This still misses cases where the exception might be wrapped in others.
We could check the messages xml element to get those too, but that might give us false positives.

Eg problem case: System.Net.Http.Functional.Tests.HttpClientTest.CancelAllPending_AllPendingOperationsCanceled
- this uses Assert.All, so you get bunch of exceptions wrapped in
Xunit.Sdk.AllException.

- These tests show up as

`[PNSE] System.Net.Http.Functional.Tests.SocketsHttpHandler_Connect_Test.ConnectMethod_Success`

And the test results show:
`Tests run: 1774, Errors: 0, Failures: 13, PNSE: 1226, Skipped: 71.  Time: 10.198805s`

Here `PNSE:` shows the count for tests that throw PNSE.
And `Failures` *do not* include PNSE failures.

In the xml report, such tests are shown with `result="PNSE"`:

```xml
<test
	name="System.Net.Http.Functional.Tests.SyncHttpHandler_Connect_Test.ConnectMethod_Success"
	type="System.Net.Http.Functional.Tests.SyncHttpHandler_Connect_Test"
	method="ConnectMethod_Success" time="0.000525"
	result="PNSE">
```

.. instead of `result="Fail"`.

To detect these, we look for exception-type==PNSE .
This still misses cases where the exception might be wrapped in others.
We could check the messages xml element to get those too, but that might give us false positives.

Eg problem case: `System.Net.Http.Functional.Tests.HttpClientTest.CancelAllPending_AllPendingOperationsCanceled`
	- this uses `Assert.All`, so you get bunch of exceptions wrapped in
	`Xunit.Sdk.AllException`.
@radical
Copy link
Member Author

radical commented Sep 26, 2020

@radical
Copy link
Member Author

radical commented Sep 26, 2020

I'll refactor this a bit to move the wasm specific stuff.

@akoeplinger
Copy link
Member

I don't understand why we want this?

There will be issues with other parts of the system that don't expect a result="PNSE" in the xml result.

Copy link
Member

@lewing lewing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we need to work through the tests on wasm and mark/skip them appropriately, not assume anything.

@radical radical closed this Sep 26, 2020
@radical radical deleted the wasm-tests-pnse branch September 26, 2020 22:41
@lewing
Copy link
Member

lewing commented Sep 26, 2020

For the record I'd love to be able to supply custom filter code to categorize failures at the point of failure.

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

Successfully merging this pull request may close these issues.

3 participants