Skip to content
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

Some Flaky Tests #1446

Open
Agorguy opened this issue May 15, 2023 · 0 comments
Open

Some Flaky Tests #1446

Agorguy opened this issue May 15, 2023 · 0 comments
Labels

Comments

@Agorguy
Copy link

Agorguy commented May 15, 2023

Hello,

We tried running your project and discovered that it contains some flaky tests (i.e., tests that nondeterministically pass and fail). We found these tests to fail more frequently when running them on certain machines of ours.

To prevent others from running this project and its tests in machines that may result in flaky tests, we suggest adding information to the README.md file indicating the minimum resource configuration for running the tests of this project as to prevent observation of test flakiness.

If we run this project in a machine with 1cpu and 500mb ram, we observe flaky tests. We found that the tests in this project did not have any flaky tests when we ran it on machines with 2cpu and 2gb ram.

Here is a list of the tests we have identified and their likelihood of failure on a system with less than the recommended 2 CPUs and 2 GB RAM.

  1. org.zalando.riptide.failsafe.RetryAfterDelayFunctionTest#shouldRetryOnDemandWithDynamicDelay (3 out 10)
  2. org.zalando.riptide.failsafe.RetryAfterDelayFunctionTest#shouldRetryWithDynamicDelayDate (7 out 10)
  3. org.zalando.riptide.failsafe.FailsafePluginRetriesTest#shouldAllowNestedCalls (4 out 10)

Please let me know if you would like us to create a pull request on this matter (possibly to the readme of this project).

Thank you for your attention to this matter. We hope that our recommendations will be helpful in improving the quality and performance of your project, especially for others to use.

Reproducing

FROM maven:3.6.3-openjdk-17

WORKDIR /home/

RUN git clone https://github.com/zalando/riptide
  
WORKDIR /home/riptide/

RUN mvn install -DskipTests 

ENTRYPOINT ["mvn", "test", "-fn"]

Build the image:

$> mkdir tmp

$> cp Dockerfile tmp

$> cd tmp

$> docker build -t dubbo . # estimated time of build 3m

Running:
this configuration likely prevents flakiness (no flakiness in 10 runs)

$> docker run --rm --memory=2g --cpus=2 --memory-swap=-1 riptide | tee output.txt
$> grep "Failures:"  output.txt # checking results

this other configuration –similar to the previous– can’t prevent flaky tests (observation in 10 runs)

$> docker run --rm --memory=500mb --cpus=1 --memory-swap=-1 riptide | tee output2.txt
$> grep "Failures:"  output2.txt # checking results
@Agorguy Agorguy added the Bug label May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant