Skip to content

Commit c7a3ba5

Browse files
Fix session_transaction_spec to use CSOT for timeout test
The test expected TimeoutError from a non-CSOT with_transaction call. Per the spec, non-CSOT mode re-raises the original error directly. Add timeout_ms: 5000 to enable CSOT so the test matches its intent.
1 parent bf72c2f commit c7a3ba5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

spec/mongo/session_transaction_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class SessionTransactionSpecError < StandardError; end
136136
allow(session).to receive('check_transactions_supported!').and_return true
137137

138138
expect do
139-
session.with_transaction do
139+
session.with_transaction(timeout_ms: 5000) do
140140
exc = Mongo::Error::OperationFailure.new('timeout test')
141141
exc.add_label('TransientTransactionError')
142142
raise exc

0 commit comments

Comments
 (0)