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

Convert unit tests for $dateXyz operators to integration tests

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Unknown Unknown
    • 2.17.0
    • 2.16.1
    • LINQ3
    • None
    • Fully Compatible

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: