diff --git a/tests/ctst/features/pra.feature b/tests/ctst/features/pra.feature index 30f8f52c8b..e74e0cf8da 100644 --- a/tests/ctst/features/pra.feature +++ b/tests/ctst/features/pra.feature @@ -18,7 +18,7 @@ Feature: PRA operations Given a DR installed Then the DR source should be in phase "Running" And the DR sink should be in phase "Running" - Then the kafka DR volume exists + And the kafka DR volume should exists # Check that objects are transitioned in the DR site Given access keys for the replicated account diff --git a/tests/ctst/steps/pra.ts b/tests/ctst/steps/pra.ts index 2d7be377ef..d1185e566a 100644 --- a/tests/ctst/steps/pra.ts +++ b/tests/ctst/steps/pra.ts @@ -91,7 +91,7 @@ export async function displayDebuggingInformation(world: Zenko) { }); } -async function waitForPhase( +async function verifyPhase( world: Zenko, target: 'source' | 'sink', state: ZenkoDrSinkPhases | ZenkoDrSourcePhases, @@ -152,16 +152,13 @@ async function waitForPhase( target, }); - if (phase === state) { - return true; - } - await Utils.sleep(1000); + return phase === state; } return false; } -Given('a DR installed', { timeout: 130000 }, async function (this: Zenko) { +Given('a DR installed', { timeout: 360000 }, async function (this: Zenko) { Identity.useIdentity(IdentityEnum.ACCOUNT, Zenko.sites['source'].accountName); const credentials = Identity.getCurrentCredentials(); await createSecret(this, 'drctl-s3-creds', { @@ -183,7 +180,7 @@ Given('a DR failing to be installed', { timeout: 130000 }, async function (this: return; }); -Then('the DR sink should be in phase {string}', { timeout: 360000 }, async function (this: Zenko, state: string) { +Then('the DR sink should be in phase {string}', { timeout: 10000 }, async function (this: Zenko, state: string) { let targetPhase; switch (state) { case 'New': @@ -211,10 +208,10 @@ Then('the DR sink should be in phase {string}', { timeout: 360000 }, async funct throw new Error(`Unknown state ${state}`); } - await waitForPhase(this, 'sink', targetPhase); + await verifyPhase(this, 'sink', targetPhase); }); -Then('the DR source should be in phase {string}', { timeout: 360000 }, async function (this: Zenko, state: string) { +Then('the DR source should be in phase {string}', { timeout: 10000 }, async function (this: Zenko, state: string) { let targetPhase; switch (state) { case 'New': @@ -239,7 +236,7 @@ Then('the DR source should be in phase {string}', { timeout: 360000 }, async fun throw new Error(`Unknown state ${state}`); } - await waitForPhase(this, 'source', targetPhase); + await verifyPhase(this, 'source', targetPhase); }); Then('object {string} should {string} be {string} and have the storage class {string} on {string} site', @@ -270,7 +267,7 @@ Then('object {string} should {string} be {string} and have the storage class {st } }); -Then('the kafka DR volume exists', { timeout: 60000 }, async function (this: Zenko) { +Then('the kafka DR volume should exists', { timeout: 60000 }, async function (this: Zenko) { const volumeClaim = await getPVCFromLabel(this, 'kafka_cr', 'end2end-pra-sink-base-queue'); this.logger.debug('kafka volume claim', { volumeClaim }); assert(volumeClaim);