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

Convert unit tests for $dateXyz operators to integration tests

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 2.17.0
    • Affects Version/s: 2.16.1
    • Component/s: LINQ3
    • None
    • Fully Compatible

      There is at least one bug in the work done for CSHARP-3343 to support $dateXyz operators. The following method should return TimeSpan not DateTime:

      https://github.com/mongodb/mongo-csharp-driver/blob/v2.16.1/src/MongoDB.Driver/Linq/DateTimeExtensions.cs#L238

      The existing unit test does not fail because we are only asserting on the generated MQL which is correct. A full round trip integration test probably would have revealed the issue.

      Let's convert all unit tests for CSHARP-3343 to integration tests.

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: