flare icon indicating copy to clipboard operation
flare copied to clipboard

Flaky test on test_stress_kernels.py

Open jzysak25 opened this issue 4 years ago • 0 comments

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.

jzysak25 avatar Oct 21 '21 23:10 jzysak25