Open ravimandala opened 4 years ago
It's worth testing if that flow still works. Wondering if anyone of the Bluepill users is using this regularly!!!???
I'm currently working on parallel retries to deflake tests.
The plan is:
I originally had hoped there was some minimal configuration on a single run like:
bp --failure-tolerance=2 --run-retries-in-parallel
I did not see an existing flag that looked like --run-retries-in-parallel
. So instead, I worked on having multiple runs:
bp --failure-tolerance=0
[parse failures and rerun]
bp --repeat-count=2 --include failedTest1 --include failedTest2
Based on the output below, it looks like the repeats are run in series. As a result, this doesn't work for us either.
{73078} 20200324.144027 [ INFO ] (BLUEPILL) BP-1 (PID 73098) has finished with exit code 1.
{73078} 20200324.144027 [ INFO ] (BLUEPILL) PID 73098 exited 1.
{73078} 20200324.144027 [ INFO ] (BLUEPILL) Started BP-2 (PID 73279).
In your case of running a particular case 100 times, it would be prohibitively slow if these repeats were NOT run in parallel.
Based on above, I think the ability to either run repeats or retries in parallel would be a very useful feature to add. I'd also imagine this is not too difficult considering the parallelism is already there for running multiple different tests.
The parallel execution of repeats is certainly possible, just that it might not be the way it is done now. Especially if a test or a set of tests has to be run n
number of times, then running in series is not a good option. Thanks for pointing that out.
I was able to add parallel execution of repeats with a fairly small change. I will make a PR.
That said, parallel retries seems a bit more complicated. A task is not retried by adding a new bundle to the queue, but rather a task restarting itself. This means that it will be more complicated to have a task restart itself multiple times. To support this, I think it would be a good idea to first have tasks add themselves back into the queue and let the scheduler handle the rest.
@RainNapper It would be great to have this implemented in some form, whether it is integrating https://github.com/RainNapper/bluepill/tree/mmark/pinpill/pinpill/pinpill in some capacity or in full capacity into the Bluepill. Do you have some time to revisit this?
Bluepill should support a use case to run a particular test like 100 times. Even better, if Bluepill can support running a given set of tests any given number of times, then it would help in debugging flaky tests.
Can this be done by using
include
andrepeat-count
parameters in conjunction? 🤔