From 5fe6c432de163d9613b300d5f4e6addebfcf9dc4 Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Mon, 5 Aug 2024 09:57:11 +0530 Subject: [PATCH] Fix authority expiry timeout --- src/nameservice-expiry.test.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/nameservice-expiry.test.ts b/src/nameservice-expiry.test.ts index 184c13a..88f8a32 100644 --- a/src/nameservice-expiry.test.ts +++ b/src/nameservice-expiry.test.ts @@ -60,10 +60,11 @@ const nameserviceExpiryTests = () => { }); test('Wait for expiry duration', (done) => { - setTimeout(done, 60 * 1000); + const expiryTime = 60 * 1000; // Wait some more time for block to be executed - setTimeout(done, 3 * 1000); + const waitTime = expiryTime + (3 * 1000); + setTimeout(done, waitTime); }); test('Check record expiry time', async () => { @@ -87,10 +88,11 @@ const nameserviceExpiryTests = () => { }); test('Wait for expiry duration', (done) => { - setTimeout(done, 60 * 1000); + const expiryTime = 60 * 1000; // Wait some more time for block to be executed - setTimeout(done, 3 * 1000); + const waitTime = expiryTime + (3 * 1000); + setTimeout(done, waitTime); }); test('Check record deleted without bond balance', async () => {