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

Inconsistent use of exceptions from insertMany between CRUD and transaction tests

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Test Coverage
    • Labels:
      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

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

              Dates

              Created:
              Updated: