"msecs must be a number" when using the --timeout option.
Closed this issue · 18 comments
I guess the command argument is not converted from a string to a number.
What version and command line are you running exactly? I am unable to reproduce the error. I found an unrelated bug and fixed it in 1.3.2 though, so please run that and report back.
I installed version 1.3.0 from npm.
Please update the package on npm.
When will you release version 1.3.2 to npm?
Done, sorry!
Is this happening again? I am on version 1.4.3 and my call looks like this:
loadtest -k --timeout 1000 http://localhost:xxx/yyyy
@cmaart Works for me locally, what OS are you on?
version 1.4.4
win 10 64bit
loadtest --timeout 600 http://localhost:3000/
still happening
Odd, let me look into it.
@brezinajn I found a bug and corrected it, please retest with 1.4.5, just published.
On both 1.4.5 and 2.0.0 I get
throw new TypeError('"listener" argument must be a function');
^
TypeError: "listener" argument must be a function
at ClientRequest.once (events.js:295:11)
at ClientRequest.setTimeout (_http_client.js:610:22)
at HttpClient.self.makeRequest (C:\Users\than\AppData\Roaming\npm\node_modules\loadtest\lib\loadtest.js:210:12)
at HttpClient.self.start (C:\Users\than\AppData\Roaming\npm\node_modules\loadtest\lib\loadtest.js:144:16)
at startClients (C:\Users\than\AppData\Roaming\npm\node_modules\loadtest\lib\loadtest.js:465:12)
at self.start (C:\Users\than\AppData\Roaming\npm\node_modules\loadtest\lib\loadtest.js:413:3)
at Object.exports.loadTest (C:\Users\than\AppData\Roaming\npm\node_modules\loadtest\lib\loadtest.js:378:12)
at Object.<anonymous> (C:\Users\than\AppData\Roaming\npm\node_modules\loadtest\bin\loadtest.js:138:10)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
Can you please send me the trace for 2.0.0? The bug in 1.4.5 (shown in your current trace) was solved, there must be another one.
stack trace from v 2.0.0
throw new TypeError('"listener" argument must be a function');
^
TypeError: "listener" argument must be a function
at ClientRequest.once (events.js:295:11)
at ClientRequest.setTimeout (_http_client.js:610:22)
at HttpClient.self.makeRequest (C:\Users\than\AppData\Roaming\npm\node_modules\loadtest\lib\httpClient.js:211:12)
at HttpClient.self.start (C:\Users\than\AppData\Roaming\npm\node_modules\loadtest\lib\httpClient.js:145:16)
at startClients (C:\Users\than\AppData\Roaming\npm\node_modules\loadtest\lib\loadtest.js:176:12)
at self.start (C:\Users\than\AppData\Roaming\npm\node_modules\loadtest\lib\loadtest.js:120:3)
at Object.exports.loadTest (C:\Users\than\AppData\Roaming\npm\node_modules\loadtest\lib\loadtest.js:85:12)
at Object.<anonymous> (C:\Users\than\AppData\Roaming\npm\node_modules\loadtest\bin\loadtest.js:138:10)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
`
OK, another stupid bug! Found and corrected it, should be fixed in 2.0.1. Please retry and let me know how it goes!
stacktrace from v2.0.1 (it didn't ping the server)
[Wed Sep 14 2016 14:07:42 GMT+0200 (Central Europe Daylight Time)] INFO Requests: 0, requests per second: 0, mean latency: 0 ms
timers.js:285
throw new TypeError('"msecs" argument must be a number');
^
TypeError: "msecs" argument must be a number
at Object.exports.enroll (timers.js:285:11)
at Socket.setTimeout (net.js:321:12)
at ClientRequest.<anonymous> (_http_client.js:636:10)
at ClientRequest.g (events.js:286:16)
at emitOne (events.js:101:20)
at ClientRequest.emit (events.js:188:7)
at tickOnSocket (_http_client.js:562:7)
at onSocketNT (_http_client.js:574:5)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
`
In 2.0.2 I am converting to a number, please try it and report back. Thanks for your patience in tracking this #&%! bug!
It's working :). Thank you for your effort. It's highly appreciated.
Good to know, closing.
How to fix the issue. I am using the node 14.16.0and tried 14.17.0 nad 14.17.1 as well