Skip to content

Commit b8b5aa9

Browse files
committed
use driver.TransientTransactionError
1 parent c4c8746 commit b8b5aa9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

x/mongo/driver/topology/pool_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"go.mongodb.org/mongo-driver/v2/internal/eventtest"
2222
"go.mongodb.org/mongo-driver/v2/internal/require"
2323
"go.mongodb.org/mongo-driver/v2/mongo/address"
24+
"go.mongodb.org/mongo-driver/v2/x/mongo/driver"
2425
"go.mongodb.org/mongo-driver/v2/x/mongo/driver/operation"
2526
)
2627

@@ -1599,8 +1600,7 @@ func TestPool_Error(t *testing.T) {
15991600

16001601
var pce poolClearedError
16011602
if errors.As(err, &pce) {
1602-
expectedLabel := "TransientTransactionError"
1603-
assert.Contains(t, pce.errorLabels, expectedLabel, `expected error to include the "TransientTransactionError" label`)
1603+
assert.Contains(t, pce.errorLabels, driver.TransientTransactionError, `expected error to include the "TransientTransactionError" label`)
16041604
} else {
16051605
t.Errorf("expected poolClearedError, got %v", err)
16061606
}

0 commit comments

Comments
 (0)