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

Fix TestReplace on .NET Core 2.1

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Testing
    • None

    Description

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

      [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
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: