Skip to content

Commit 1cde213

Browse files
author
iwysiu
committed
GODRIVER-1192 make transaction tests run faster on replica sets
Change-Id: I4f8e333586ac549f3b6565fe276098a4f16440fd
1 parent ae1568b commit 1cde213

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

mongo/transactions_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,14 @@ func runTransactionTestFile(t *testing.T, filepath string) {
156156
t.Skip()
157157
}
158158

159+
if os.Getenv("TOPOLOGY") == "replica_set" {
160+
err := dbAdmin.RunCommand(ctx, bson.D{
161+
{"setParameter", 1},
162+
{"transactionLifetimeLimitSeconds", 3},
163+
}).Err()
164+
require.NoError(t, err)
165+
}
166+
159167
for _, test := range testfile.Tests {
160168
runTransactionsTestCase(t, test, testfile, dbAdmin)
161169
}

0 commit comments

Comments
 (0)