[SERVER-55202] Add assertion if migration committed or aborted in TenantMigrationTest fixture Created: 15/Mar/21 Updated: 29/Oct/23 Resolved: 12/May/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | 5.0 Desired |
| Fix Version/s: | 4.9.0-rc1, 5.0.0-rc0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Xuerui Fa | Assignee: | Wenbin Zhu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | pm-1791_non-cloud-blocking, pm-1791_polish | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Backport Requested: |
v4.9
|
||||
| Sprint: | Repl 2021-05-17 | ||||
| Participants: | |||||
| Description |
|
Currently in the TenantMigrationTest fixture, runMigration() and waitForMigrationToComplete() will return if the migration has committed or aborted. This is by design – to confirm if the migration has committed or aborted, we check the state of the result in each individual JS test ( here is an example ). However, this can be confusing for tests that assume that the migration will be committed, and it seems easy to forget to check the state after calling runMigration(). We should probably add some additional utility assertion functions that will directly assert that the migration committed or aborted. Maybe the above example could be converted to something like: tenantMigrationTest.assertAborted(tenantMigrationTest.waitForMigrationToComplete(...)); or maybe we could add the new assertions to assert.js. |
| Comments |
| Comment by Githook User [ 13/May/21 ] |
|
Author: {'name': 'Wenbin Zhu', 'email': 'wenbin.zhu@mongodb.com', 'username': 'WenbinZhu'}Message: (cherry picked from commit 1cb18cbb349e71cbd869c48c1e288527b48d6d73) |
| Comment by Githook User [ 12/May/21 ] |
|
Author: {'name': 'Wenbin Zhu', 'email': 'wenbin.zhu@mongodb.com', 'username': 'WenbinZhu'}Message: |