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

Flaky test on test_stress_kernels.py #295

Open
Jiaming1999 opened this issue Oct 21, 2021 · 0 comments
Open

Flaky test on test_stress_kernels.py #295

Jiaming1999 opened this issue Oct 21, 2021 · 0 comments
Labels
test Test needed

Comments

@Jiaming1999
Copy link

Describe the bug
A clear and concise description of what the bug is.
A flaky test is detected by running pytest plug-in flake-finder.
Particularly is the test "test_force_grad"
"assert (
np.abs(ls_val - force_force_gradient[1][1, m, n]) < threshold
), "The force/force gradient is wrong."" will fail inconsistently.
I was trying to fix it, but realize the assertion failed because value of force_force_gradient[1][1, m, n] will drift a little bit from time to time and do not know how to precisely fix the gradient function. My assumption is something wrong with the implementation of 3bodykernel.

To Reproduce
Steps to reproduce the behavior:
0. Install flake finder following https://github.com/dropbox/pytest-flakefinder

  1. Go to 'tests'
  2. In terminal, run 'pytest test_stress_kernels.py --flake-finder'
  3. See error

Expected behavior
Error message will appear in terminal saying some run in test_stress_kernels.py failed.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Win10
  • Browser [e.g. chrome, safari]
  • Version Python 3.8.3, pytest-6.2.5, flake-finder 1.0.0

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@YuuuXie YuuuXie added the test Test needed label Dec 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Test needed
Projects
None yet
Development

No branches or pull requests

2 participants