Skip to content

Commit e9296a2

Browse files
Apply same tolerance fix to NORMAL_COMMAND_TIMEOUT assertions
1 parent 0173fa7 commit e9296a2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/client/lib/tests/test-scenario/timeout-during-notifications.e2e.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,9 @@ describe("Timeout Handling During Notifications", () => {
164164
"Command Timeout error should be instanceof Error"
165165
);
166166
assert.ok(
167-
durationMigrate >= NORMAL_COMMAND_TIMEOUT &&
167+
durationMigrate >= NORMAL_COMMAND_TIMEOUT * 0.8 &&
168168
durationMigrate < NORMAL_COMMAND_TIMEOUT * 1.2,
169-
`Normal command should timeout within normal timeout ms`
169+
`Normal command should timeout within normal timeout ms. Duration: ${durationMigrate}, Expected: [${NORMAL_COMMAND_TIMEOUT * 0.8}, ${NORMAL_COMMAND_TIMEOUT * 1.2})`
170170
);
171171
assert.strictEqual(
172172
errorMigrate?.constructor?.name,
@@ -199,9 +199,9 @@ describe("Timeout Handling During Notifications", () => {
199199
"Command Timeout error should be instanceof Error"
200200
);
201201
assert.ok(
202-
durationBind >= NORMAL_COMMAND_TIMEOUT &&
202+
durationBind >= NORMAL_COMMAND_TIMEOUT * 0.8 &&
203203
durationBind < NORMAL_COMMAND_TIMEOUT * 1.2,
204-
`Normal command should timeout within normal timeout ms`
204+
`Normal command should timeout within normal timeout ms. Duration: ${durationBind}, Expected: [${NORMAL_COMMAND_TIMEOUT * 0.8}, ${NORMAL_COMMAND_TIMEOUT * 1.2})`
205205
);
206206
assert.strictEqual(
207207
errorBind?.constructor?.name,

0 commit comments

Comments
 (0)