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 tests #19

Open
sindresorhus opened this issue Sep 8, 2019 · 1 comment

Comments

@sindresorhus
Copy link
Owner

commented Sep 8, 2019

Issuehunt badges

A couple of tests were failing, so they are skipped. Would be nice to figure out why they are failing now.

  • timed-out/test.js

    Lines 21 to 34 in 9cc4ef1

    it.skip('should emit ETIMEDOUT when connection timeout expires', done => {
    // To prevent the connection from being established use a non-routable IP
    // address. See https://tools.ietf.org/html/rfc5737#section-3
    const request = http.get('http://192.0.2.1');
    request.on('error', error => {
    if (error.code === 'ETIMEDOUT') {
    assert.equal(error.message, 'Connection timed out on request to 192.0.2.1');
    done();
    }
    });
    timeout(request, 200);
    });
  • timed-out/test.js

    Lines 194 to 231 in 9cc4ef1

    it.skip('should clear socket timeout for keep-alive sockets', done => {
    server.once('request', (request, response) => {
    response.writeHead(200);
    response.end('data');
    });
    let socket = null;
    const agent = new http.Agent({
    keepAlive: true,
    maxSockets: 1
    });
    const options = {
    hostname: '0.0.0.0',
    agent,
    port
    };
    const request = http.get(options, response => {
    assert.equal(socket.timeout, 100);
    response.resume();
    response.on('end', () => {
    assert.equal(socket.destroyed, false);
    assert.equal(socket.timeout, -1);
    agent.destroy();
    done();
    });
    });
    timeout(request, 100);
    request.on('socket', socket_ => {
    socket_.once('connect', () => {
    assert.equal(socket_.timeout, 100);
    });
    socket = socket_;
    });
    });

IssueHunt Summary

Backers (Total: $40.00)

Submitted pull Requests


Become a backer now!

Or submit a pull request to get the deposits!

Tips


IssueHunt has been backed by the following sponsors. Become a sponsor

@issuehunt-app

This comment has been minimized.

Copy link

commented Sep 9, 2019

@issuehunt has funded $40.00 to this issue.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.