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

test: unflake async hooks statwatcher test #30362

Closed
wants to merge 1 commit into from

Commits on Dec 21, 2019

  1. test: unflake async hooks statwatcher test

    Under high load 2 types of issues arise with this test.
    * filesystem calls gets queued even when the 'sync' is used which leads
      to async_hooks being called with the events of tmpdir clean or
      initial file write after clean.
      This is solved by counting all 'change' calls while making sure there
      is no dependency of StatWatcher's on one another and the expected
      changes are waited for.
    
    * some events are getting lost with the current
      clean->write->write_and_watch strategy. Specifically I observed the
      file size going from 0 to 5 entirely skipping 3 even though the write
      call was there (this happened reliably on -j128).
      So I've changed the strategy to avoid additional write considering
      this still tests the hooks correctly.
      This may indicate some sort of bug in async_hooks though I'm not sure.
    
    Closes: nodejs#21425
    lundibundi committed Dec 21, 2019
    Configuration menu
    Copy the full SHA
    33b8300 View commit details
    Browse the repository at this point in the history