Closed Bug 1041798 Opened 11 years ago Closed 11 years ago

ulimit errors when running npm test

Categories

(Hello (Loop) :: Server, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 1032733

People

(Reporter: pdehaan, Unassigned)

Details

(Whiteboard: [qa+])

I was trying to run `npm test` on the loop-server repo, but I'm getting a ulimit error even though my ulimit is apparently `unlimited`. ``` $ ulimit && npm test unlimited > mozilla-loop-server@0.10.0-dev test /Users/pdehaan/dev/loop-server > make test ulimit is too low. Please run 'ulimit -S -n 2048' before running tests. make: *** [cover-mocha] Error 1 npm ERR! Test failed. See above for more details. npm ERR! not ok code 0 ```
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Whiteboard: [qa+]
weird, i thought that unlimited was higher than 2048. fair enough. --- Now I'm seeing 2 test failures: ``` websockets ✓ should echo back a message ✓ should reject bad authentication tokens ✓ should reject an invalid callId with a valid hawk session ✓ should accept caller authenticating with a valid token url ✓ should return the state of the call with two clients ✓ should broadcast alerting state to other interested parties ✓ should broadcast action change and handle race condition. ✓ should broadcast half-connected signal. ✓ should close socket on progress/connected message ✓ should close the socket on progress/terminate message 1) should close the socket on storage error { [Error: Error with storage] isCritical: true } 2) "after each" hook 212 passing (1s) 2 failing 1) websockets with two clients should close the socket on storage error: Uncaught AssertionError: expected 'missing audience parameter' to deeply equal 'Invalid audience' + expected - actual +"Invalid audience" -"missing audience parameter" at /Users/pdehaan/dev/loop-server/test/fxa_test.js:192:26 at Request._callback (/Users/pdehaan/dev/loop-server/loop/fxa.js:9:2364) at Request.self.callback (/Users/pdehaan/dev/loop-server/node_modules/request/request.js:121:22) at Request.emit (events.js:98:17) at Request.<anonymous> (/Users/pdehaan/dev/loop-server/node_modules/request/request.js:985:14) at Request.emit (events.js:117:20) at IncomingMessage.<anonymous> (/Users/pdehaan/dev/loop-server/node_modules/request/request.js:936:12) at IncomingMessage.emit (events.js:117:20) at _stream_readable.js:929:16 at process._tickCallback (node.js:419:13) 2) websockets with two clients "after each" hook: Uncaught Error: not opened at WebSocket.send (/Users/pdehaan/dev/loop-server/node_modules/ws/lib/WebSocket.js:187:16) at /Users/pdehaan/dev/loop-server/loop/websockets.js:9:18872 at Object.<anonymous> (/Users/pdehaan/dev/loop-server/loop/websockets.js:9:2233) at serverError (/Users/pdehaan/dev/loop-server/loop/websockets.js:9:490) at /Users/pdehaan/dev/loop-server/loop/websockets.js:9:3160 at /Users/pdehaan/dev/loop-server/loop/storage/redis.js:9:22976 at Object.<anonymous> (/Users/pdehaan/dev/loop-server/test/websockets_test.js:489:9) at Function.invoke (/Users/pdehaan/dev/loop-server/node_modules/sinon/lib/sinon/spy.js:153:55) at Object.proxy [as getCallState] (eval at createProxy (/Users/pdehaan/dev/loop-server/node_modules/sinon/lib/sinon/spy.js:77:82), <anonymous>:1:37) at /Users/pdehaan/dev/loop-server/loop/storage/redis.js:9:22767 at try_callback (/Users/pdehaan/dev/loop-server/node_modules/redis/index.js:573:9) at RedisClient.return_reply (/Users/pdehaan/dev/loop-server/node_modules/redis/index.js:661:13) at HiredisReplyParser.<anonymous> (/Users/pdehaan/dev/loop-server/node_modules/redis/index.js:309:14) at HiredisReplyParser.emit (events.js:95:17) at HiredisReplyParser.execute (/Users/pdehaan/dev/loop-server/node_modules/redis/lib/parser/hiredis.js:43:18) at RedisClient.on_data (/Users/pdehaan/dev/loop-server/node_modules/redis/index.js:534:27) at Socket.<anonymous> (/Users/pdehaan/dev/loop-server/node_modules/redis/index.js:91:14) at Socket.emit (events.js:95:17) at Socket.<anonymous> (_stream_readable.js:748:14) at Socket.emit (events.js:92:17) at emitReadable_ (_stream_readable.js:410:10) at emitReadable (_stream_readable.js:406:5) at readableAddChunk (_stream_readable.js:168:9) at Socket.Readable.push (_stream_readable.js:130:10) at TCP.onread (net.js:528:21) ============================================================================= Writing coverage object [/Users/pdehaan/dev/loop-server/coverage/coverage.json] Writing coverage reports at [/Users/pdehaan/dev/loop-server/coverage] ============================================================================= =============================== Coverage summary =============================== Statements : 84.99% ( 957/1126 ) Branches : 74.23% ( 363/489 ) Functions : 96.96% ( 223/230 ) Lines : 86.89% ( 948/1091 ) ================================================================================ make: *** [cover-mocha] Error 2 ```
Yes. I don't think the websockets support is all there yet, but this looks like it's worth a new bug. Please file one!
ulimit unlimited doesn't exist for EMFILE. To see your current limit run: ulimit -n > I don't think the websockets support is all there yet Yes it is also make sure you have a high enough timeout for mocha, 2000ms is too small on some computers. Also make test take care of all of this for you.
OK.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.