Skip to content
This repository has been archived by the owner on May 24, 2021. It is now read-only.

Cypress retry stuck for last test when running cypress tests in parallel on docker #27

Open
psurana0329 opened this issue Oct 15, 2019 · 5 comments

Comments

@psurana0329
Copy link

I have a cypress suite where we are running bunch of cypress test files with 2-3 tests each and for the last test if it fails then its retries and that is stuck forever

@kuceb
Copy link
Owner

kuceb commented Oct 15, 2019

@psurana0329 this is likely. Do you have a reproducible example you can give?

@psurana0329
Copy link
Author

i can repro this consistently, basically symptom i am seeing is that if i have a cyrun file that is executing a bunch of specs parallely and the last one if failed then is stuck in a loop. Any idea how could we resolve this.
i added :
require('cypress-plugin-retries');
beforeEach(() => {
Cypress.env('RETRIES', 2);
});

☝️ logic is in index.js which assures 2 retries for all the tests i am executing.
Also all the parallel runs are in docker so i only have access to /bin/bash . Let me know if you need any particular logs

@kuceb
Copy link
Owner

kuceb commented Oct 17, 2019

@psurana0329 this is not a reproducible example. Here's an example of one, which includes the full code needed to reproduce the problem: https://github.com/Bkucera/cypress-plugin-retries/blob/master/cypress/tests/e2e/after-hook-fail.spec.js

Note this may take some work on your end to isolate the problem, but it's the only way I will be able to investigate this

@psurana0329
Copy link
Author

@bkucera I cant paste the proprietary code that gives any insight into what is happening in the test but can we create a skeleton example wherein my index.js has:
require('cypress-plugin-retries');

beforeEach(() => {
Cypress.env('RETRIES', 2);
});
and I am running a series of spec files in parallel and noticing that there is one spec that is stuck in forever loop when checked on cypress dashboard. Also please let me know if there is any logging that i can collect from the docker container which is running the stuck spec file.

@kuceb
Copy link
Owner

kuceb commented Oct 21, 2019

we create a skeleton example

@psurana0329 yes, this is exactly what I need, could you provide it? I need more information than just what's in the beforeEach. Like a simple 2-3 test "skeleton" example spec that reproduces the issue. The "running a series of spec files in parallel" is what's making this issue ambiguous and non-reproducible

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants