Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-3247

Inconsistent use of exceptions from insertMany between CRUD and transaction tests

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Test Coverage
    • None

    Description

      CrudTest is expecting a failed insertMany to just return an error result but still include all the various counts (insertedCount, etc). TransactionTest is expecting an exception to be thrown. JsonPoweredCrudTestHelper has to deal with both situations, and it results in spaghetti code where JsonPoweredCrudTestHelper has to check whether there's an active transaction and either throw or not based on that.

      We should clean up this technical debt.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: