Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Fix XmlSchema and XSLT failing tests on Unix - #13645

Merged
sepidehkh merged 2 commits into
dotnet:masterfrom
sepidehkh:FixSchemaXsltTestsOnUnix
Nov 14, 2016
Merged

sepidehkh merged 2 commits into
dotnet:masterfrom
sepidehkh:FixSchemaXsltTestsOnUnix

Conversation

@sepidehkh

Copy link
Copy Markdown
Contributor

Resolves https://github.com/dotnet/corefx/issues/12789
Xslt and Schema tests were using file paths and wrong capitalization of file names which would work on Windows, but not on Unix-based platforms. This is fixed in this PR.
Some tests are also made windows-specific as they test cases specific to windows.

@danmosemsft @weshaggard @stephentoub

@danmoseley

Copy link
Copy Markdown

:shipit:

*/

//[Variation(id = 11, Desc = "Load stylesheet with entity reference: Bug #68450 ")]
[ActiveIssue(9877)]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Interesting... this was passing before your change and is now failing?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These tests are using checksum to verify the results, which can be flaky and turns out to fail all the time on Linux. There is an issue tracking this to rewrite these tests to not use checksum anymore.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ok. Thanks.

}

//[Variation("Load with \"\\\\\"")]
[PlatformSpecific(TestPlatforms.Windows)] //Not a valid path on Unix

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not a valid path on Unix

It actually is valid on Unix... and that's the problem for this test, right? It's expecting an invalid path?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, I will fix that.

}

_output.WriteLine("Exception not generated for invalid ouput destination");
Assert.True(false);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we use Assert.Throws instead?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

(Looks like there are a bunch of other places that would apply, too, so maybe a subsequently cleanup)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

That's what I figured.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

When these tests were ported from Desktop, the process of porting tests to Xunit was automated and it was only feasible to use Assert.True(false) in place of failures. As you mentioned, this is repeated in many places and since it's not high priority, I created issue https://github.com/dotnet/corefx/issues/13647 to track this cleanup task.

@sepidehkh
sepidehkh merged commit 13bfba4 into dotnet:master Nov 14, 2016
@karelz karelz modified the milestone: 1.2.0 Dec 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add XmlSchema and Xslt test coverage for Non-Windows platforms

5 participants