|
We should improve tenant_migration_donor_unblock_reads_and_writes_on_completion.js in order to check if a command was successful by using
assert.commandWorked instead of just calling runCommand.
-> Handle the return value in the startReadThread method. In the second test case we have the test expect the read command to actually fail. We should test before doing the assert.soon to avoid any hanging for 10 mins (even if the command succeeded maybe the operation itself failed and the numread will remain 0).
We should also improve assert.soon error message to print out the value obtained against the value it's tested. For instance, instead of :
Error: assert.soon failed: () => TenantMigrationUtil.getNumBlockedReads(laggedSecondary, tenantId) == 1
We should print
Error: assert.soon failed: () => TenantMigrationUtil.getNumBlockedReads(laggedSecondary, tenantId) valuehere == 1
The bottom line is that somehow that startReadThread function seem to have thrown before even calling the read method due to a connectivity error this resulted in the getNumBlockedReads to stay at 0 since the read never happened.
|