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

Inconsistent use of exceptions from insertMany between CRUD and transaction tests

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Test Coverage
    • Labels:
      None

      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.

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

              Created:
              Updated: