Skip to content

Commit c68eaab

Browse files
committed
fail "insert" instantly, so the timeout is always detected
1 parent b1cb840 commit c68eaab

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

test/integration/transactions-convenient-api/transactions-convenient-api.prose.test.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,23 +131,20 @@ describe('Retry Timeout is Enforced', function () {
131131
}
132132
},
133133
async function () {
134-
// 1. Configure a failpoint that always fails insert with TransientTransactionError
135-
// and blocks for 25ms to consume timeout budget.
134+
// 1. Configure a failpoint that always fails insert with TransientTransactionError.
136135
await configureFailPoint(this.configuration, {
137136
configureFailPoint: 'failCommand',
138137
mode: 'alwaysOn',
139138
data: {
140139
failCommands: ['insert'],
141-
blockConnection: true,
142-
blockTimeMS: 25,
143140
errorCode: 24,
144141
errorLabels: ['TransientTransactionError']
145142
}
146143
});
147144

148145
// 2. Run withTransaction with a callback that performs an insert.
149146
// The insert will always fail with TransientTransactionError, triggering retries
150-
// until the timeout (timeoutMS: 100) is exceeded.
147+
// until the timeout (timeoutMS: 100) is exceeded at the backoff check.
151148
const { result } = await measureDuration(() => {
152149
return client.withSession(async s => {
153150
await s.withTransaction(async session => {

0 commit comments

Comments
 (0)