From 48b94951095aef7012faf850353dbb7b971f113a Mon Sep 17 00:00:00 2001 From: Jakob Warkotsch Date: Mon, 30 Oct 2023 14:17:03 +0100 Subject: [PATCH] REST: Enable retries for flaky blocked user e2e test This enables retries for a test that appears to have issues similar to the one addressed in If2c33f983f705b0026e3c60e26a61a24371b7bad. Bug: T348849 Change-Id: Ica9ba2fea31e9ddef4783444f2e04563bb1d8352 --- repo/rest-api/tests/mocha/api-testing/AuthTest.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/repo/rest-api/tests/mocha/api-testing/AuthTest.js b/repo/rest-api/tests/mocha/api-testing/AuthTest.js index 60dce72d732..e485f1fc7e9 100644 --- a/repo/rest-api/tests/mocha/api-testing/AuthTest.js +++ b/repo/rest-api/tests/mocha/api-testing/AuthTest.js @@ -167,7 +167,10 @@ describe( 'Auth', () => { }, 'POST' ); } ); - it( 'cannot edit if blocked', async () => { + it( 'cannot edit if blocked', async function () { + // this test often hits a race condition where this request is made before the user is blocked + this.retries( 3 ); + const response = await newRequestBuilder().withUser( user ).makeRequest(); expect( response ).to.have.status( 403 ); } );