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

fix(cache/unstable): fix flaky fibonacci test #5872

Merged
merged 2 commits into from
Aug 30, 2024

Conversation

lionel-rowe
Copy link
Contributor

Fixes this: https://github.com/denoland/std/actions/runs/10625661936/job/29455981411?pr=5626

 ERRORS 

memoize() is performant for expensive fibonacci function => ./cache/memoize_test.ts:65:6
error: AssertionError: Expected actual: "1724984137590" to be close to "1724984137573": delta "17" is greater than "10".
  throw new AssertionError(
        ^
    at assertAlmostEquals (file:///D:/a/std/std/assert/almost_equals.ts:51:9)
    at file:///D:/a/std/std/cache/memoize_test.ts:73:3

 FAILURES 

@lionel-rowe lionel-rowe requested a review from kt3k as a code owner August 30, 2024 02:51
Copy link

codecov bot commented Aug 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.34%. Comparing base (d279c0a) to head (cf75348).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5872   +/-   ##
=======================================
  Coverage   96.34%   96.34%           
=======================================
  Files         479      479           
  Lines       38674    38674           
  Branches     5628     5627    -1     
=======================================
+ Hits        37259    37262    +3     
+ Misses       1371     1368    -3     
  Partials       44       44           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lionel-rowe
Copy link
Contributor Author

Something weird going on here, attempt 1 at a fix was apparently timing out after a full 10 seconds (successful fix logged <=2ms to complete in each environment). Are functions like performance.now, Date.now etc now being globally overridden in CI or something?

https://github.com/denoland/std/actions/runs/10625999673/job/29456871384

@iuioiua iuioiua changed the title fix(cache/unstable): Fix flaky fibonacci test fix(cache/unstable): fix flaky fibonacci test Aug 30, 2024
Copy link
Contributor

@iuioiua iuioiua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @kt3k, any idea what could've caused the weird behavior as mentioned in #5872 (comment)?

@iuioiua iuioiua merged commit 8782bdb into denoland:main Aug 30, 2024
17 checks passed
@kt3k
Copy link
Member

kt3k commented Aug 30, 2024

I don't think we override performance.now or Date.now in CI.

FakeTime overrides Date class, but that shouldn't affect this test case (Test cases in a single file should be executed sequentially even with --parallel flag)

So I have no idea what caused the above error

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

Successfully merging this pull request may close these issues.

3 participants