[JAVA-3247] Inconsistent use of exceptions from insertMany between CRUD and transaction tests Created: 26/Mar/19 Updated: 30/Mar/22 |
|
| Status: | Backlog |
| Project: | Java Driver |
| Component/s: | Test Coverage |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Jeffrey Yemin | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| 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. |