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: fix flaky test-http-client-timeout-with-data #10431

Closed
wants to merge 1 commit into from

Commits on Dec 23, 2016

  1. test: fix flaky test-http-client-timeout-with-data

    test-http-client-timeout-with-data has failed here and there in CI on
    FreeBSD and OS X. The test has a socket timeout set to 50ms and a timer
    set for 100ms. However, they are not necessarily set in the same tick of
    the event loop and their ordering is therefore not guaranteed.
    
    Instead of using a timer, this change listens for an event on the
    listener to know when the socket timeout has occurred and then runs the
    code originally in the timer.
    
    Additional refactoring: Replaced `process.on('exit', ...)` checks with
    `common.mustCall()` and replaced usage of `assert.equal()` with
    `assert.strictEqual()`.
    Trott committed Dec 23, 2016
    Configuration menu
    Copy the full SHA
    e393506 View commit details
    Browse the repository at this point in the history