From 43a47ef4674a23e2f1c29a2a9c3894c1bccd2792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Fri, 20 Sep 2024 00:33:23 +0200 Subject: [PATCH] fix: do not close twice in mysql test --- mysql/mysql_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mysql/mysql_test.go b/mysql/mysql_test.go index b0c44d01..6462f201 100644 --- a/mysql/mysql_test.go +++ b/mysql/mysql_test.go @@ -64,7 +64,6 @@ func mustStartMySQL(t testing.TB) *mysql.MySQLContainer { func Test_MYSQL_New(t *testing.T) { testStore, err := newTestStore(t) require.NoError(t, err) - defer testStore.Close() require.True(t, testStore.db != nil) require.NoError(t, testStore.Close()) @@ -81,7 +80,7 @@ func Test_MYSQL_New(t *testing.T) { }) require.True(t, newConfigStore.db != nil) - newConfigStore.Close() + // no need to close the newConfigStore since the testStore is called in the defer } func Test_MYSQL_Set(t *testing.T) {