Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /home/picotech/domains/inventory.picotech.app/public_html/node_modules/stream-http/test/browser/ drwxr-xr-x |
Viewing file: Select action/file-type: var Buffer = require('buffer').Buffer var fs = require('fs') var test = require('tape') var http = require('../..') test('timeout', function (t) { var req = http.get({ path: '/browserify.png?copies=5', requestTimeout: 10 // ms }, function (res) { res.on('data', function (data) { }) res.on('end', function () { t.fail('request completed (should have timed out)') }) }) req.on('requestTimeout', function () { t.pass('got timeout') t.end() }) }) // TODO: reenable this if there's a way to make it simultaneously // fast and reliable test.skip('no timeout after success', function (t) { var req = http.get({ path: '/basic.txt', requestTimeout: 50000 // ms }, function (res) { res.on('data', function (data) { }) res.on('end', function () { t.pass('success') global.setTimeout(function () { t.end() }, 50000) }) }) req.on('requestTimeout', function () { t.fail('unexpected timeout') }) }) |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0181 ]-- |