Add assertion if migration committed or aborted in TenantMigrationTest fixture

XMLWordPrintableJSON

    • Fully Compatible
    • v4.9
    • Repl 2021-05-17
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

              Assignee:
              Wenbin Zhu
              Reporter:
              Xuerui Fa
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: