diff --git a/packages/kbn-es/src/utils/native_realm.test.js b/packages/kbn-es/src/utils/native_realm.test.js index 0361800606898..cd124c97dfdd4 100644 --- a/packages/kbn-es/src/utils/native_realm.test.js +++ b/packages/kbn-es/src/utils/native_realm.test.js @@ -85,7 +85,7 @@ describe('isSecurityEnabled', () => { throw error; }); - expect(await nativeRealm.isSecurityEnabled()).toBe(false); + expect(await nativeRealm.isSecurityEnabled({ maxAttempts: 1 })).toBe(false); }); test('rejects if unexpected error is thrown', async () => { @@ -97,9 +97,9 @@ describe('isSecurityEnabled', () => { throw error; }); - await expect(nativeRealm.isSecurityEnabled()).rejects.toThrowErrorMatchingInlineSnapshot( - `"ResponseError"` - ); + await expect( + nativeRealm.isSecurityEnabled({ maxAttempts: 1 }) + ).rejects.toThrowErrorMatchingInlineSnapshot(`"ResponseError"`); }); });