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

Fix XmlReader Test on ARM #3035

Open
MichelZ opened this issue Nov 25, 2024 · 5 comments · May be fixed by #3012
Open

Fix XmlReader Test on ARM #3035

MichelZ opened this issue Nov 25, 2024 · 5 comments · May be fixed by #3012
Labels
Area\Tests Issues that are targeted to tests or test projects ✔️ Triage Done Issues that are triaged by dev team and are in investigation.

Comments

@MichelZ
Copy link
Contributor

MichelZ commented Nov 25, 2024

DataStreamTest.ExecuteXmlReaderTest fails on ARM (and only on ARM, but both, NET462 and NET8) with:

[xUnit.net 00:02:15.08]     Microsoft.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_TCP [FAIL]
  [xUnit.net 00:02:15.08]       FAILED: Actual XML results differed from expected value.
  Expected: <orders orderid="10248" /> (System.String)
  Actual: <orders orderid="10250" /> (System.String)
  [xUnit.net 00:02:15.08]       Expected: True
  [xUnit.net 00:02:15.08]       Actual:   False
  [xUnit.net 00:02:15.08]       Stack Trace:
  [xUnit.net 00:02:15.08]         /_/src/Microsoft.Data.SqlClient/tests/ManualTests/DataCommon/DataTestUtility.cs(724,0): at Microsoft.Data.SqlClient.ManualTesting.Tests.DataTestUtility.AssertEqualsWithDescription(Object expectedValue, Object actualValue, String failMessage)
  [xUnit.net 00:02:15.08]         /_/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/DataStreamTest/DataStreamTest.cs(796,0): at Microsoft.Data.SqlClient.ManualTesting.Tests.DataStreamTest.ExecuteXmlReaderTest(String connectionString)
  [xUnit.net 00:02:15.08]         /_/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/DataStreamTest/DataStreamTest.cs(168,0): at Microsoft.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer(String connectionString, Boolean usingNamePipes)
  [xUnit.net 00:02:15.08]         /_/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/DataStreamTest/DataStreamTest.cs(38,0): at Microsoft.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_TCP()
    Failed Microsoft.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_TCP [2 s]
##[error]EXEC(0,0): Error Message: 
EXEC : error Message:  [D:\a\_work\1\s\build.proj]
     FAILED: Actual XML results differed from expected value.
  Expected: <orders orderid="10248" /> (System.String)
  Actual: <orders orderid="10250" /> (System.String)
  Expected: True
  Actual:   False
    Stack Trace:
       at Microsoft.Data.SqlClient.ManualTesting.Tests.DataTestUtility.AssertEqualsWithDescription(Object expectedValue, Object actualValue, String failMessage) in /_/src/Microsoft.Data.SqlClient/tests/ManualTests/DataCommon/DataTestUtility.cs:line 724
     at Microsoft.Data.SqlClient.ManualTesting.Tests.DataStreamTest.ExecuteXmlReaderTest(String connectionString) in /_/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/DataStreamTest/DataStreamTest.cs:line 796
     at Microsoft.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer(String connectionString, Boolean usingNamePipes) in /_/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/DataStreamTest/DataStreamTest.cs:line 168
     at Microsoft.Data.SqlClient.ManualTesting.Tests.DataStreamTest.RunAllTestsForSingleServer_TCP() in /_/src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/DataStreamTest/DataStreamTest.cs:line 38

The test is currently disabled with an ActiveIssue "5540", would be great to get the description for this from Azure DevOps

@MichelZ MichelZ linked a pull request Nov 25, 2024 that will close this issue
@David-Engel
Copy link
Contributor

The issue just has the error that the test was throwing at the time:

RunAllTestsForSingleServer_TCP variation fails with this exception:
Microsoft.Data.SqlClient.SqlException : A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - The specified network name is no longer available.)
2018-11-19T22:31:46.1819832Z ---- System.ComponentModel.Win32Exception : The specified network name is no longer available

In 2018, (MDS ~1.x) there was likely no time to investigate further. But given the new error, it looks like things have progressed since then.

@MichelZ
Copy link
Contributor Author

MichelZ commented Nov 26, 2024

@David-Engel I don't think so, have a look at these test results:
https://dev.azure.com/sqlclientdrivers/public/_build/results?buildId=102372&view=logs&j=c4d123bd-af38-58be-f467-a90b89592a05&t=3d22ce1c-8a2a-5bf5-a576-9c31e7813191

The tests only fail on ARM, they fail twice per Job, and only TestSet 2 fails.
So this test fails 6 times on ARM with the exact same message, but succeeds on all others

That's very suspicious to me

@MichelZ
Copy link
Contributor Author

MichelZ commented Nov 26, 2024

Ah, apologies, I missunderstood you. You've posted the description of the original Issue :)

@cheenamalhotra cheenamalhotra added Area\Tests Issues that are targeted to tests or test projects ✔️ Triage Done Issues that are triaged by dev team and are in investigation. labels Nov 26, 2024
@edwardneal
Copy link
Contributor

The relevant sections of the test are here. I think this is actually a problem with the test: it expects to receive results in a specific sequence, but never specifies an ORDER BY in the query; SQL Server will thus just use the order specified in the clustered index/PK. Does the test fail if you include the ORDER BY statement?

There's a similar point to be made for the query on line 682.

@MichelZ
Copy link
Contributor Author

MichelZ commented Nov 27, 2024

The relevant sections of the test are here. I think this is actually a problem with the test: it expects to receive results in a specific sequence, but never specifies an ORDER BY in the query; SQL Server will thus just use the order specified in the clustered index/PK. Does the test fail if you include the ORDER BY statement?

There's a similar point to be made for the query on line 682.

Yes, of course! Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area\Tests Issues that are targeted to tests or test projects ✔️ Triage Done Issues that are triaged by dev team and are in investigation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants