diff --git a/couchbase/couchbase_test.go b/couchbase/couchbase_test.go index af72d539..1542b0ee 100644 --- a/couchbase/couchbase_test.go +++ b/couchbase/couchbase_test.go @@ -142,10 +142,8 @@ func TestSetAndReset_ResetShouldReturn_NoError(t *testing.T) { func TestClose_CloseShouldReturn_NoError(t *testing.T) { testStore, err := newTestStore(t) require.NoError(t, err) - defer testStore.Close() - err = testStore.Close() - require.NoError(t, err) + require.NoError(t, testStore.Close()) } func TestGetConn_ReturnsNotNil(t *testing.T) { diff --git a/minio/minio_test.go b/minio/minio_test.go index ace3581c..f0890385 100644 --- a/minio/minio_test.go +++ b/minio/minio_test.go @@ -254,7 +254,6 @@ func Test_Reset(t *testing.T) { func Test_Close(t *testing.T) { testStore, err := newTestStore(t) require.NoError(t, err) - defer testStore.Close() require.NoError(t, testStore.Close()) } diff --git a/mongodb/mongodb_test.go b/mongodb/mongodb_test.go index 189e5b93..019390ef 100644 --- a/mongodb/mongodb_test.go +++ b/mongodb/mongodb_test.go @@ -186,7 +186,6 @@ func Test_MongoDB_Reset(t *testing.T) { func Test_MongoDB_Close(t *testing.T) { testStore, err := newTestStore(t) require.NoError(t, err) - defer testStore.Close() require.Nil(t, testStore.Close()) } diff --git a/mssql/mssql_test.go b/mssql/mssql_test.go index 749f7c1d..87bdef94 100644 --- a/mssql/mssql_test.go +++ b/mssql/mssql_test.go @@ -248,7 +248,6 @@ func Test_SslRequiredMode(t *testing.T) { func Test_MSSQL_Close(t *testing.T) { testStore, err := newTestStore(t) require.NoError(t, err) - defer testStore.Close() require.Nil(t, testStore.Close()) } diff --git a/mysql/mysql_test.go b/mysql/mysql_test.go index 0cfc1197..b0c44d01 100644 --- a/mysql/mysql_test.go +++ b/mysql/mysql_test.go @@ -262,7 +262,6 @@ func Test_MYSQL_Non_UTF8(t *testing.T) { func Test_MYSQL_Close(t *testing.T) { testStore, err := newTestStore(t) require.NoError(t, err) - defer testStore.Close() require.Nil(t, testStore.Close()) } diff --git a/postgres/postgres_test.go b/postgres/postgres_test.go index 93b70b8b..5add856d 100644 --- a/postgres/postgres_test.go +++ b/postgres/postgres_test.go @@ -257,7 +257,6 @@ func Test_Postgres_Conn(t *testing.T) { func Test_Postgres_Close(t *testing.T) { testStore, err := newTestStore(t) require.NoError(t, err) - defer testStore.Close() require.Nil(t, testStore.Close()) }