From 348a9aea6f95e83ce100e232d939df933cb75d5d Mon Sep 17 00:00:00 2001 From: andri lim Date: Fri, 8 Sep 2023 21:37:50 +0700 Subject: [PATCH] Close eth node after usage (#1741) --- hive_integration/nodocker/engine/engine_env.nim | 6 +++++- hive_integration/nodocker/engine/withdrawal_tests.nim | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hive_integration/nodocker/engine/engine_env.nim b/hive_integration/nodocker/engine/engine_env.nim index bebf6774f..44e8b9bcb 100644 --- a/hive_integration/nodocker/engine/engine_env.nim +++ b/hive_integration/nodocker/engine/engine_env.nim @@ -152,9 +152,13 @@ proc newEngineEnv*(conf: var NimbusConf, chainFile: string, enableAuth: bool): E client : client, sync : sync ) + +proc close(node: EthereumNode) = + node.stopListening() + waitFor node.listeningServer.closeWait() proc close*(env: EngineEnv) = - env.node.stopListening() + env.node.close() env.sync.stop() waitFor env.client.close() waitFor env.sealer.stop() diff --git a/hive_integration/nodocker/engine/withdrawal_tests.nim b/hive_integration/nodocker/engine/withdrawal_tests.nim index 8fbe775d4..5ba479515 100644 --- a/hive_integration/nodocker/engine/withdrawal_tests.nim +++ b/hive_integration/nodocker/engine/withdrawal_tests.nim @@ -256,7 +256,7 @@ let wdTestList* = [ "- Wait for sync, which include syncing a pre-Withdrawals block, and verify withdrawn account's balance\n", run: specExecute[SyncSpec], spec: SyncSpec( - timeoutSeconds: 300, + timeoutSeconds: 50, wdForkHeight: 2, wdBlockCount: 128, wdPerBlock: MAINNET_MAX_WITHDRAWAL_COUNT_PER_BLOCK,