-
-
Notifications
You must be signed in to change notification settings - Fork 753
Closed
Labels
Description
Problem
Hey guys, looks like there is a problem with timeouts. I notice two problems:
- Global step timeout doesn't always work (see example below where
step1doesn't have specific step timeout but it fails because of Scenario timeout) - After Scenario times out, all the consequent Scenarios are failing because of 0.01ms timeout. It looks like Scenario timeout acts as a global timeout
Expected results
In my case, I'd expect step1 to fail because of global step timeout of 150sec and step2 fail because of custom timeout of 120sec which I set in config. All the Scenarios should execute and if they time out after 600sec (as set in config), it should affect only single Scenario. But it's not the case
Console output:
# initial step fails
[LOG] 04-17-24 03:35:58 error: Step 'step1' failed
[LOG] 04-17-24 03:35:58 error: | TC-8652: Verify that *** failed:
Error: Action step1: *** was interrupted on step timeout 564676ms
# step from After() fails with the timeout of 38ms
[LOG] 04-17-24 03:36:03 error: Step 'step1' failed
[LOG] 04-17-24 03:36:03 error: "after each" hook: *** failed:
Error: Action step1: *** was interrupted on step timeout 38ms
# all the consequent tests fail with timeout of 0.01ms
[LOG] 04-17-24 03:36:08 error: Step 'step2' failed
[LOG] 04-17-24 03:36:08 error: "before all" hook: @@@ failed:
Error: Action step2: *** was interrupted on step timeout 0.01ms
# ...
[LOG] 04-17-24 03:36:09 error: Step 'step2' failed
[LOG] 04-17-24 03:36:09 error: "before all" hook: @@@ failed:
Error: Action step2: *** was interrupted on step timeout 0.01ms
# 400+ tests fail with the same log outputDetails
- CodeceptJS version: 3.5.12
- NodeJS Version: 16.17.0
- Operating System: Windows 11
Config
Here's timeouts config. Note that step1 which was the step where scenario initially failed doesn't have specific timeout
exports.config = {
timeout: 600,
plugins: {
stepTimeout: {
enabled: true,
customTimeoutSteps: [
["step2", 120],
["step3", 60]
]
}
}
}