-
Notifications
You must be signed in to change notification settings - Fork 672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test failing makes other tests running in parallel fail #2852
Comments
I think it is related to #2546 because with -u this bug disappears. Another detail is that the ones which fail with the "Unhandled promise rejection" error do not fail when executed isolated. |
Hi, @Lupiano var util = require('util');
process.on('unhandledRejection', (reason, p) => {
console.log(util.format('%j', reason))
});
|
I'm getting this: {"type":"externalAssertionLibraryError","isTestCafeError":true,"callsite":{"filename":"[filePath]","lineNum":[someLine],"callsiteFrameIdx":6,"stackFrames":[{},{},{},{},{},{},{},{},{},{},{},{},{}],"isV8Frames":true},"errMsg":"AssertionError: Some description: expected false to be truthy"} It is a simple assertion error on some Selector. |
BTW @AlexKamaev is there a way to skip these errors by code? Thanks for your time! |
@Lupiano, thanks for your cooperation. The issue is unexpected, a simple assertion error should not cause unhandled rejection. Could I ask you to share your test file and test page or prepare a simple test, which shows the issue? process.removeAllListeners('unhandledRejection'); Still, I do not recommend using this approach, because we need to detect the reason of the issue. |
Hello @AlexKamaev, currently I cannot show you the test page, and the test file is a bit complex because uses some page objects, but it's something like this:
This fails because the "reportsPage.pendingTab" selector is not possible to click (the element is under some other div that makes not possible to click it). The input element that is expected to appear does not, so there is an assertion error:
This is what generates the Unhandled Rejection errors in the other tests running in parallel. |
@Lupiano |
Sure @AlexKamaev, if you need me to help you with something just tell me. Thanks! |
Hi,
It only seems to occur when using chaining multiple expect asserts and when the failure does not occur in the last expect/assert. e.g if you flip the two expects around in the example, you won't see the unhandled promise rejection BTW this error occurring did lead me to find another issue in my tests! I found some expects without asserts that were causing the test to incorrectly pass on previous versions of test cafe. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or feature requests. For TestCafe API, usage and configuration inquiries, we recommend asking them on StackOverflow. |
…s#2852) (DevExpress#2874) * [WIP]fix unhandled promise rejection in chain assertions (closes DevExpress#2852) * async to promise * depth to default * lint * promiseThen to originalThen
Are you requesting a feature or reporting a bug?
Reporting a bug.
What is the current behavior?
When I am running my tests concurrently in more than one browser and one test fails, all the tests that are running at the same time also fail. The other tests continue its execution but the final report is this:
Unhandled promise rejection:
[object Object]
What is the expected behavior?
Failure in one tests must not affect others.
How would you reproduce the current behavior (if this is a bug)?
Provide the test code and the tested page URL (if applicable)
Tested page URL:
Test code
Specify your
The text was updated successfully, but these errors were encountered: