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

Too long running CI #1341

Closed
dubzzz opened this issue Jan 10, 2021 · 3 comments · Fixed by #1347
Closed

Too long running CI #1341

dubzzz opened this issue Jan 10, 2021 · 3 comments · Fixed by #1347

Comments

@dubzzz
Copy link
Owner

dubzzz commented Jan 10, 2021

🐛 Bug Report

DEFAULT_SEED is: -2006168428 (unit)

See https://github.com/dubzzz/fast-check/runs/1670947194?check_suite_focus=true

@dubzzz
Copy link
Owner Author

dubzzz commented Jan 11, 2021

Running cross-env DEFAULT_SEED=-2006168428 jest --config jest.unit.config.cjs --coverage reproduces the error locally.

It seems that the long running test is:

double>Given minimal and maximal values [between min (included) and max (excluded)]>Should always generate correct values
in file test/unit/check/arbitrary/FloatingPointArbitrary.spec.ts

It seems that we fall into an infinite shrinking loop, with the following starting point:

  ● FloatingPointArbitrary › double › Given minimal and maximal values [between min (included) and max (excluded)] › Should always generate correct values

    Property failed after 42 tests
    { seed: -2006168428, path: "41", endOnFailure: true }
    Counterexample: [[4,{"min":21474836.28,"max":21474836.41}],1346200227]
    Shrunk 0 time(s)
    Got error: Error: Expect: 21474836.41 to be a valid value

@dubzzz
Copy link
Owner Author

dubzzz commented Jan 11, 2021

Except the original issue, we have a long running convergence/shrink process, but shrinking seems not to be stopped (just too slow):

...
      - [[2,{"min":21473903.96,"max":21473904.24}],1346200227]
      - [[2,{"min":21473903.93,"max":21473903.96}],1346200227]
      - [[2,{"min":21473903.65,"max":21473903.93}],1346200227]
      - [[2,{"min":21473903.62,"max":21473903.65}],1346200227]
      - [[2,{"min":21473903.34,"max":21473903.62}],1346200227]
      - [[2,{"min":21473903.31,"max":21473903.34}],1346200227]
      - [[2,{"min":21473903.03,"max":21473903.31}],1346200227]
      - [[2,{"min":21473903,"max":21473903.03}],1346200227]
      - [[2,{"min":21473902.72,"max":21473903}],1346200227]
      - [[2,{"min":21473902.69,"max":21473902.72}],1346200227]
      - [[2,{"min":21473902.41,"max":21473902.69}],1346200227]
      - [[2,{"min":21473902.38,"max":21473902.41}],1346200227]
      - [[2,{"min":21473902.1,"max":21473902.38}],1346200227]
      - [[2,{"min":21473902.07,"max":21473902.1}],1346200227]
      - [[2,{"min":21473901.79,"max":21473902.07}],1346200227]
      - [[2,{"min":21473901.76,"max":21473901.79}],1346200227]
      - [[2,{"min":21473901.48,"max":21473901.76}],1346200227]
      - [[2,{"min":21473901.45,"max":21473901.48}],1346200227]
...

@dubzzz
Copy link
Owner Author

dubzzz commented Jan 11, 2021

const {min, max} = {"min":21474836.28,"max":21474836.41};
const v = (((1 << 26) - 1) * (Math.pow(2, 27)) + (1 << 27) - 1) * (Math.pow(2, -53));
console.log(min + v * (max - min)) // 21474836.41

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

Successfully merging a pull request may close this issue.

1 participant