summaryrefslogtreecommitdiff
path: root/test/disabled/test-https-loop-to-google.js
blob: dd3bae8c62c8774ca60b0d2cfe08ec83616850b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Failing test for https

// Will fail with "socket hang up" for 4 out of 10 requests
// Tested on node 0.5.0-pre commit 9851574


var https = require('https');

for(var i = 0; i < 10; ++i)
{
  https.get(
  {
    host: 'www.google.com',
    path: '/accounts/o8/id',
    port: 443,
  }, function(res)
  {
    var data = ''; 
    res.on('data', function(chunk)
    {   
      data += chunk;
    }); 
    res.on('end', function()
    {   
      console.log(res.statusCode);
    }); 
  }).on('error', function(error)
  {
    console.log(error);
  }); 
}