Skip to content

Commit a2c526d

Browse files
Add debug info to assertion messages for root cause analysis
1 parent 7c419e0 commit a2c526d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,17 @@ describe("Timeout Handling During Notifications", () => {
125125
notifications.forEach((notification) => {
126126
assert.ok(
127127
result[notification]?.error instanceof Error,
128-
`${notification} notification error should be instanceof Error`
128+
`${notification} notification error should be instanceof Error. Got: ${JSON.stringify(result[notification])}`
129129
);
130130
assert.ok(
131131
result[notification]?.duration >= RELAXED_COMMAND_TIMEOUT &&
132132
result[notification]?.duration < RELAXED_COMMAND_TIMEOUT * 1.2,
133-
`${notification} notification should timeout within relaxed timeout`
133+
`${notification} notification should timeout within relaxed timeout. Duration: ${result[notification]?.duration}, Expected: [${RELAXED_COMMAND_TIMEOUT}, ${RELAXED_COMMAND_TIMEOUT * 1.2})`
134134
);
135135
assert.strictEqual(
136136
result[notification]?.error?.constructor?.name,
137137
"CommandTimeoutDuringMaintenanceError",
138-
`${notification} notification error should be CommandTimeoutDuringMaintenanceError`
138+
`${notification} notification error should be CommandTimeoutDuringMaintenanceError. Got: ${result[notification]?.error?.constructor?.name}`
139139
);
140140
});
141141
});

0 commit comments

Comments
 (0)