From 1cb2d6291ffd20deb5b592c5640e17458be9192d Mon Sep 17 00:00:00 2001 From: Nikolay Nedkov Date: Fri, 16 Dec 2022 11:35:35 +0200 Subject: [PATCH] moving poolDbConfig to other var declarations and adding deferred Teardown Signed-off-by: Nikolay Nedkov --- test/benchmarks/sequencer/pool_processing_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/benchmarks/sequencer/pool_processing_test.go b/test/benchmarks/sequencer/pool_processing_test.go index 29764dc9ab..d2f42cb289 100644 --- a/test/benchmarks/sequencer/pool_processing_test.go +++ b/test/benchmarks/sequencer/pool_processing_test.go @@ -37,10 +37,9 @@ const ( invalidNonceStartingPercent = 90 ) -var poolDbConfig = dbutils.NewPoolConfigFromEnv() - var ( ctx = context.Background() + poolDbConfig = dbutils.NewPoolConfigFromEnv() sequencerPrivateKey = operations.DefaultSequencerPrivateKey chainID = operations.DefaultL2ChainID opsCfg = operations.GetDefaultOperationsConfig() @@ -54,6 +53,7 @@ var ( func BenchmarkSequencerPoolProcess(b *testing.B) { ctx := context.Background() + defer func() { require.NoError(b, operations.Teardown()) }() opsman, client, pl, senderNonce, gasPrice := setup(ctx, b) sendAndWaitTxs(b, senderNonce, client, gasPrice, pl, ctx) startAndSetupSequencer(b, opsman)