Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Raising the wait will resulting in making the test flaky after few days.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wait is not a hardcoded sleep; it is the timeout for the API call to respond. Typically, I observe successful responses within 1 second, but for better stability, I have set it to 2 seconds. If the response is received within 1 second, the test will pass without delay.

Maintaining this timeout avoids the need for adding retries, which could mask potential bugs. Introducing retries increases the risk of missing errors and reduces the accuracy of our tests.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe(
dataManager.dsValues[dataManager.defaultEnviorment].mockApiUrl
}123`;
apiPage.CreateAndFillApi(randomApi);
apiPage.RunAPI(false, 20, {
apiPage.RunAPI(false, 2000, {
expectedPath: "response.body.data.body.data.isExecutionSuccess",
expectedRes: false,
});
Expand All @@ -24,7 +24,7 @@ describe(
);

apiPage.EnterHeader(">", "");
apiPage.RunAPI(false, 20, {
apiPage.RunAPI(false, 2000, {
expectedPath: "response.body.data.body.data.isExecutionSuccess",
expectedRes: false,
});
Expand All @@ -37,7 +37,7 @@ describe(
});

apiPage.EnterHeader("", "");
apiPage.RunAPI(false, 20, {
apiPage.RunAPI(false, 2000, {
expectedPath: "response.body.data.body.data.isExecutionSuccess",
expectedRes: false,
});
Expand Down