@@ -782,7 +782,7 @@ describe('@api-batch-1 RPC Server Acceptance Tests', function () {
782782 . setTransactionMemo ( 'Relay test token transfer' ) ;
783783 const resp = await transaction . execute ( servicesNode . client ) ;
784784 await resp . getRecord ( servicesNode . client ) ;
785- await new Promise ( ( r ) => setTimeout ( r , 1000 ) ) ;
785+ await Utils . wait ( 1000 ) ;
786786 const logsRes = await mirrorNode . get ( `/contracts/results/logs?limit=1` , requestId ) ;
787787 const blockNumber = logsRes . logs [ 0 ] . block_number ;
788788 const formattedBlockNumber = prepend0x ( blockNumber . toString ( 16 ) ) ;
@@ -856,7 +856,7 @@ describe('@api-batch-1 RPC Server Acceptance Tests', function () {
856856 } ;
857857 const signedSendHbarTx = await accounts [ 0 ] . wallet . signTransaction ( sendHbarTx ) ;
858858 await relay . sendRawTransaction ( signedSendHbarTx , requestId ) ;
859- await new Promise ( ( r ) => setTimeout ( r , 5000 ) ) ; // wait for signer's account to propagate accross the network
859+ await Utils . wait ( 5000 ) ; // wait for signer's account to propagate accross the network
860860 const deployerBalance = await global . relay . getBalance ( constants . DETERMINISTIC_DEPLOYMENT_SIGNER , 'latest' ) ;
861861 expect ( deployerBalance ) . to . not . eq ( 0 ) ;
862862
@@ -914,7 +914,7 @@ describe('@api-batch-1 RPC Server Acceptance Tests', function () {
914914 const transactionHash = await relay . sendRawTransaction ( signedTx , requestId ) ;
915915 // Since the transactionId is not available in this context
916916 // Wait for the transaction to be processed and imported in the mirror node with axios-retry
917- await new Promise ( ( r ) => setTimeout ( r , 5000 ) ) ;
917+ await Utils . wait ( 5000 ) ;
918918 await mirrorNode . get ( `/contracts/results/${ transactionHash } ` , requestId ) ;
919919
920920 const receiverEndBalance = await relay . getBalance ( parentContractAddress , 'latest' , requestId ) ;
@@ -949,7 +949,7 @@ describe('@api-batch-1 RPC Server Acceptance Tests', function () {
949949 const transactionHash = await relay . sendRawTransaction ( signedTx , requestId ) ;
950950 // Since the transactionId is not available in this context
951951 // Wait for the transaction to be processed and imported in the mirror node with axios-retry
952- await new Promise ( ( r ) => setTimeout ( r , 5000 ) ) ;
952+ await Utils . wait ( 5000 ) ;
953953 await mirrorNode . get ( `/contracts/results/${ transactionHash } ` , requestId ) ;
954954
955955 const receiverEndBalance = await relay . getBalance ( parentContractAddress , 'latest' , requestId ) ;
@@ -1081,7 +1081,7 @@ describe('@api-batch-1 RPC Server Acceptance Tests', function () {
10811081
10821082 // Since the transactionId is not available in this context
10831083 // Wait for the transaction to be processed and imported in the mirror node with axios-retry
1084- await new Promise ( ( r ) => setTimeout ( r , 5000 ) ) ;
1084+ await Utils . wait ( 5000 ) ;
10851085
10861086 await mirrorNode . get ( `/contracts/results/${ transactionHash } ` , requestId ) ;
10871087 const receiverEndBalance = await relay . getBalance ( parentContractAddress , 'latest' , requestId ) ;
@@ -1124,6 +1124,8 @@ describe('@api-batch-1 RPC Server Acceptance Tests', function () {
11241124
11251125 const signedTx = await accounts [ 2 ] . wallet . signTransaction ( transaction ) ;
11261126 const transactionHash = await relay . sendRawTransaction ( signedTx , requestId ) ;
1127+
1128+ await Utils . wait ( 1000 ) ;
11271129 const txInfo = await mirrorNode . get ( `/contracts/results/${ transactionHash } ` , requestId ) ;
11281130
11291131 const contractResult = await mirrorNode . get ( `/contracts/${ txInfo . contract_id } ` ) ;
0 commit comments