mythmon / crimsontwins

We have these two big TVs on the wall. This is something to do with them.
Mozilla Public License 2.0
25 stars 5 forks source link

Server not starting correctly for Node 0.8 #41

Open lonnen opened 11 years ago

lonnen commented 11 years ago

It looks like the server is not actually starting for Node 0.8. When I remove web.start() we see the same failure pattern across all versions. When I explicitly add an additional web.start() to the first test or move it from the before() func into the first test the tests pass.

lonnen commented 11 years ago

The before() func is being called, the server does not appear to actually start. Strange, since it still logs the callback from the server start.

lonnen commented 11 years ago

It looks like the callback isn't being called at all. So strange. Locally I've updated to the same exact version and I still can't reproduce this.

mythmon commented 11 years ago

I ran the tests on the main Stackato instance. node --version says 0.8.14. The tests fail in the exact same way as on Travis. All of the tests involving calling Express views fail.

The API works on the same instance of CT, therefore I assume that this is purely a problem in the test harness, not the code.

lonnen commented 11 years ago

It's worth noting for posterity that the hubot plugin triggered a traceback similar to what see in these test error cases.

crimsonguardcommanders: onscreen reset Xomat

TypeError: Cannot call method 'indexOf' of undefined
at Array.exports.blacklistNoodle [as 0] (/app/app/app/modifiers.js:12:25)
at EventEmitter.ContentManager.contentForUrl (/app/app/app/manager.js:237:32)
at EventEmitter.ScreenManager.sendUrl (/app/app/app/manager.js:79:23)
at /app/app/app/web.js:43:21
at callbacks (/app/app/node_modules/express/lib/router/index.js:161:37)
at param (/app/app/node_modules/express/lib/router/index.js:135:11)
at pass (/app/app/node_modules/express/lib/router/index.js:142:5)
at Router._dispatch (/app/app/node_modules/express/lib/router/index.js:170:5)
at Object.router (/app/app/node_modules/express/lib/router/index.js:33:10)
at next (/app/app/node_modules/express/node_modules/connect/lib/proto.js:190:15)
mythmon commented 11 years ago

I don't believe that the noodle error in the last comment is related. I think this was because the hubot plugin was sending strings intended for the reset command (like "Xomat") to the sendurl api endpoint. The noodle modifier assumed it was a url and tried to parse it as such. This was since fixed.

lonnen commented 11 years ago

Aha! That makes sense too.

lonnen commented 11 years ago

was this fixed by dffad688ddc687a12709d12560536d6202bb6596?

mythmon commented 11 years ago

Yes, it was.

mythmon commented 11 years ago

I think that the fix in dffad68 didn't actually fix the issue, as Travis still has problems with node0.8.