Skip to content

Commit b9d3521

Browse files
committed
fix TestDatabaseSql
1 parent fc0e25c commit b9d3521

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/integration/database_sql_test.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ package integration
66
import (
77
"context"
88
"database/sql"
9+
"errors"
910
"fmt"
1011
"os"
1112
"path"
1213
"sync"
1314
"testing"
1415
"time"
1516

16-
"github.com/stretchr/testify/assert"
1717
"github.com/stretchr/testify/require"
1818
"google.golang.org/grpc/metadata"
1919

@@ -217,7 +217,9 @@ func TestDatabaseSql(t *testing.T) {
217217
ReadOnly: true,
218218
}),
219219
)
220-
require.NoError(t, err)
220+
if !errors.Is(err, context.DeadlineExceeded) {
221+
require.NoError(t, err)
222+
}
221223
})
222224
})
223225
t.Run("scan", func(t *testing.T) {
@@ -280,7 +282,9 @@ func TestDatabaseSql(t *testing.T) {
280282
retry.WithDoTxRetryOptions(retry.WithIdempotent(true)),
281283
retry.WithTxOptions(&sql.TxOptions{Isolation: sql.LevelSnapshot, ReadOnly: true}),
282284
)
283-
assert.NoError(t, err)
285+
if !errors.Is(err, context.DeadlineExceeded) {
286+
require.NoError(t, err)
287+
}
284288
}()
285289
}
286290
wg.Wait()

0 commit comments

Comments
 (0)