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

Fixes outerloop test failures on OLEDB#38024

Merged
maryamariyan merged 13 commits intomasterfrom
log-oledb-ex
Jul 4, 2019
Merged

Fixes outerloop test failures on OLEDB#38024
maryamariyan merged 13 commits intomasterfrom
log-oledb-ex

Conversation

@maryamariyan
Copy link
Copy Markdown

@maryamariyan maryamariyan commented May 29, 2019

  • Wait for CI setup to complete that gets rid of JET driver from the CI. (Ensures that the SEH doesn't occur on x64 platforms)
  • Disable tests on x86 platform
  • Include extra Console.WriteLine logging and rethrow in case of SEH failure

cc: @saurabh500 @MattGal @stephentoub
Fixes: (#37823)

Comment thread src/System.Data.OleDb/tests/OleDbCommandBuilderTests.cs Outdated
Comment thread src/System.Data.OleDb/tests/Helpers.cs Outdated
Comment thread src/System.Data.OleDb/tests/OleDbCommandBuilderTests.cs Outdated
Comment thread src/System.Data.OleDb/tests/OleDbCommandBuilderTests.cs Outdated
@ViktorHofer
Copy link
Copy Markdown
Member

@maryamariyan what's the status here? Is this still blocked by the machine setup work? If yes, is there a tracking issue?

@maryamariyan maryamariyan force-pushed the log-oledb-ex branch 2 times, most recently from c3381c4 to ea255da Compare June 17, 2019 17:57
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 4 pipeline(s).

@maryamariyan
Copy link
Copy Markdown
Author

maryamariyan commented Jun 17, 2019

Checking outerloop results manually queued from corefx-outerloop pipeline:
https://dnceng.visualstudio.com/public/_build/results?buildId=227675
There were no outerloop failures run on outerloop nightly build machines:
https://mc.dot.net/#/user/dotnet-bot/pr~2Fdotnet~2Fcorefx~2Frefs~2Fheads~2Flog-oledb-ex/test~2Ffunctional~2Fcli~2Finnerloop~2F/20190617.2

but looking at the outerloop results for this PR, failure is seen on machine: Windows.10.Amd64.ClientRS4.ES.Open-x64
https://mc.dot.net/#/user/dotnet-bot/pr~2Fdotnet~2Fcorefx~2Frefs~2Fpull~2F38024~2Fmerge/test~2Ffunctional~2Fcli~2Finnerloop~2F/20190617.1/workItem/System.Data.OleDb.Tests

cc: @saurabh500

@saurabh500
Copy link
Copy Markdown
Contributor

The failure is in spanish locale execution.
The problem is covered here https://support.microsoft.com/en-us/help/173828/access-step-by-step-page-11-cannot-import-01client-txt

@saurabh500
Copy link
Copy Markdown
Contributor

saurabh500 commented Jun 20, 2019

We need to skip the tests on non english locale, till I can figure out how to make it work on non-English locale.

Comment thread src/System.Data.OleDb/tests/Helpers.cs Outdated
@maryamariyan
Copy link
Copy Markdown
Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 4 pipeline(s).

@maryamariyan
Copy link
Copy Markdown
Author

maryamariyan commented Jul 2, 2019

After examining the outerloop results I found the 5 remaining OLEDB failures:
(only on Windows.7.Amd64.Open-x64-Debug and Windows.81.Amd64.Open-x64-Debug)

  • Fix tests.

System.Data.OleDb.Tests.OleDbCommandBuilderTests.QuoteUnquoteIdentifier_Null_Throws
Windows.7.Amd64.Open-x64-Debug
Windows.81.Amd64.Open-x64-Debug

Assert.Equal() Failure
                                 ↓ (pos 21)
Expected: ···alue cannot be null. (Parameter 'unquotedIdentifier')
Actual:   ···alue cannot be null.\\r\
Parameter name: unquotedIdentifier
                                 ↑ (pos 21)

Stack Trace :
   at System.AssertExtensions.Throws[T](Action action, String message) in /_/src/CoreFx.Private.TestUtilities/src/System/AssertExtensions.cs:line 21
   at System.Data.OleDb.Tests.OleDbCommandBuilderTests.<>c.<QuoteUnquoteIdentifier_Null_Throws>b__5_0(OleDbCommand command, String tableName) in /_/src/System.Data.OleDb/tests/OleDbCommandBuilderTests.cs:line 95
   at System.Data.OleDb.Tests.OleDbCommandBuilderTests.RunTest(Action`2 testAction, String memberName) in /_/src/System.Data.OleDb/tests/OleDbCommandBuilderTests.cs:line 185
   at System.Data.OleDb.Tests.OleDbCommandBuilderTests.QuoteUnquoteIdentifier_Null_Throws() in /_/src/System.Data.OleDb/tests/OleDbCommandBuilderTests.cs:line 90

System.Data.OleDb.Tests.OleDbCommandTests.Parameters_AddNullParameter_Throws
Windows.7.Amd64.Open-x64-Debug
Windows.81.Amd64.Open-x64-Debug

Assert.Equal() Failure
                                 ↓ (pos 79)
Expected: ···ameter type objects. (Parameter 'value')
Actual:   ···ameter type objects.\\r\
Parameter name: value
                                 ↑ (pos 79)

Stack Trace :
   at System.AssertExtensions.Throws[T](Action action, String message) in /_/src/CoreFx.Private.TestUtilities/src/System/AssertExtensions.cs:line 21
   at System.Data.OleDb.Tests.OleDbCommandTests.<>c.<Parameters_AddNullParameter_Throws>b__7_0(OleDbCommand command, String tableName) in /_/src/System.Data.OleDb/tests/OleDbCommandTests.cs:line 152
   at System.Data.OleDb.Tests.OleDbCommandTests.RunTest(Action`2 testAction, String memberName) in /_/src/System.Data.OleDb/tests/OleDbCommandTests.cs:line 234
   at System.Data.OleDb.Tests.OleDbCommandTests.Parameters_AddNullParameter_Throws() in /_/src/System.Data.OleDb/tests/OleDbCommandTests.cs:line 151

System.Data.OleDb.Tests.OleDbCommandTests.CommandTimeout_SetInvalidValue_Throws
Windows.81.Amd64.Open-x64-Debug
Windows.7.Amd64.Open-x64-Debug

Assert.Equal() Failure
                                 ↓ (pos 56)
Expected: ··· value must be >= 0. (Parameter 'CommandTimeout')
Actual:   ··· value must be >= 0.\\r\
Parameter name: CommandTimeout
                                 ↑ (pos 56)

Stack Trace :
   at System.AssertExtensions.Throws[T](Action action, String message) in /_/src/CoreFx.Private.TestUtilities/src/System/AssertExtensions.cs:line 21
   at System.Data.OleDb.Tests.OleDbCommandTests.CommandTimeout_SetInvalidValue_Throws() in /_/src/System.Data.OleDb/tests/OleDbCommandTests.cs:line 37

System.Data.OleDb.Tests.OleDbCommandTests.CommandType_SetInvalidValue_Throws
Windows.81.Amd64.Open-x64-Debug
Windows.7.Amd64.Open-x64-Debug

Assert.Equal() Failure
                                 ↓ (pos 49)
Expected: ···alue, 0, is invalid. (Parameter 'CommandType')
Actual:   ···alue, 0, is invalid.\\r\
Parameter name: CommandType
                                 ↑ (pos 49)

Stack Trace :
   at System.AssertExtensions.Throws[T](Action action, String message) in /_/src/CoreFx.Private.TestUtilities/src/System/AssertExtensions.cs:line 21
   at System.Data.OleDb.Tests.OleDbCommandTests.CommandType_SetInvalidValue_Throws() in /_/src/System.Data.OleDb/tests/OleDbCommandTests.cs:line 64

System.Data.OleDb.Tests.OleDbCommandTests.UpdatedRowSource_SetInvalidValue_Throws
Windows.81.Amd64.Open-x64-Debug
Windows.7.Amd64.Open-x64-Debug

Assert.Equal() Failure
                                 ↓ (pos 54)
Expected: ···lue, 50, is invalid. (Parameter 'UpdateRowSource')
Actual:   ···lue, 50, is invalid.\\r\
Parameter name: UpdateRowSource
                                 ↑ (pos 54)

Stack Trace :
   at System.AssertExtensions.Throws[T](Action action, String message) in /_/src/CoreFx.Private.TestUtilities/src/System/AssertExtensions.cs:line 21
   at System.Data.OleDb.Tests.OleDbCommandTests.UpdatedRowSource_SetInvalidValue_Throws() in /_/src/System.Data.OleDb/tests/OleDbCommandTests.cs:line 24

@danmoseley
Copy link
Copy Markdown
Member

@maryamariyan the above diffs are because I recently changed ArgumentException to move the parameter name onto the same line of the message. I didn't see these as maybe they didn't run without the driver? You can just update the tests to make them pass.

@danmoseley
Copy link
Copy Markdown
Member

@maryamariyan also the expected and actual are confusingly reversed in the output above. This is because of here in AssertExtensions.cs:

    public static class AssertExtensions
    {
        private static bool IsFullFramework => RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework");

        public static void Throws<T>(Action action, string message)
            where T : Exception
        {
            Assert.Equal(Assert.Throws<T>(action).Message, message); // <---
        }

The parameters are reversed. Expected should be first. Perhaps you can reverse them back. It might be helpful to make sure expected is prefixed on all the appropriate parameters of the overloads in this file eg public static T Throws<T>(string paramName, Action action) -> public static T Throws<T>(string expectedParamName, Action action)

@maryamariyan
Copy link
Copy Markdown
Author

maryamariyan commented Jul 3, 2019

@maryamariyan the above diffs are because I recently changed ArgumentException to move the parameter name onto the same line of the message. I didn't see these as maybe they didn't run without the driver? You can just update the tests to make them pass.

Thanks for the hint. Just rebased and fixed now.

@maryamariyan
Copy link
Copy Markdown
Author

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 4 pipeline(s).

@maryamariyan
Copy link
Copy Markdown
Author

maryamariyan commented Jul 3, 2019

I don't see anymore OLEDB outerloop failures in the CI yet.
To be safe, I also just queued an outerloop build here.
I will safely merge this PR after this one also gets completed.


UPDATE:

No OLEDB failures in:
https://mc.dot.net/#/user/dotnet-bot/pr~2Fdotnet~2Fcorefx~2Frefs~2Fheads~2Flog-oledb-ex/test~2Ffunctional~2Fcli~2Finnerloop~2F/20190703.2

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.

7 participants