Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-2411

Fix TestReplace on .NET Core 2.1

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Testing
    • None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      The TestReplace tests in the Legacy driver fail on .NET Core 2.1 because the key-value-pairs are out of order.

      Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      [xUnit.net 00:00:01.66]     MongoDB.Driver.Tests.Builders.UpdateBuilderTests.TestReplace_Typed [FAIL]
      Failed   MongoDB.Driver.Tests.Builders.UpdateBuilderTests.TestReplace_Typed
      Error Message:
       Assert.Equal() Failure
                   ↓ (pos 3)
      Expected: { "_id" : 1, "x" : 2, "xl" : NumberLong(0), ···
      Actual:   { "x" : 2, "_id" : 1, "xl" : NumberLong(0), ···
                   ↑ (pos 3)
      Stack Trace:
         at MongoDB.Driver.Tests.Builders.UpdateBuilderTests.TestReplace_Typed() in .\tests\MongoDB.Driver.Legacy.Tests\Builders\UpdateBuilderTests.cs:line 856
      [xUnit.net 00:00:01.67]     MongoDB.Driver.Tests.Builders.UpdateBuilderTests.TestReplace [FAIL]
      Failed   MongoDB.Driver.Tests.Builders.UpdateBuilderTests.TestReplace
      Error Message:
       Assert.Equal() Failure
                   ↓ (pos 3)
      Expected: { "_id" : 1, "x" : 2, "xl" : NumberLong(0), ···
      Actual:   { "x" : 2, "_id" : 1, "xl" : NumberLong(0), ···
                   ↑ (pos 3)
      Stack Trace:
         at MongoDB.Driver.Tests.Builders.UpdateBuilderTests.TestReplace() in .\tests\MongoDB.Driver.Legacy.Tests\Builders\UpdateBuilderTests.cs:line 847
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            vincent.kam@mongodb.com Vincent Kam (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: