arunoda / laika

testing framework for meteor
http://arunoda.github.io/laika/
MIT License
242 stars 38 forks source link

ignore node_modules #85

Closed lalomartins closed 10 years ago

lalomartins commented 10 years ago

As per The New Laika hackpad, ignore node_modules when scanning tests. (Just got hit by this in my prototype, since Laika decided to run all the webdriver tests :grinning:)

arunoda commented 10 years ago

We'll be using the devel branch from now. I've merge this to it: cc966565b99926986b468da09b42e688b123fe36 Send future PR to devel branch,

arunoda commented 10 years ago

I forgot to say: awesome :+1:

aramk commented 10 years ago

This seems to be related - when I have node_modules and run laika, it seems to fall into an infinite loop of creating and closing connections on mongod and the tests never execute:

Tue May 13 14:25:28.912 [initandlisten] connection accepted from 127.0.0.1:51105 #57 (1 connection now open)
Tue May 13 14:25:28.916 [conn57] end connection 127.0.0.1:51105 (0 connections now open)
Tue May 13 14:25:28.930 [initandlisten] connection accepted from 127.0.0.1:51106 #58 (1 connection now open)
Tue May 13 14:25:28.938 [conn58] end connection 127.0.0.1:51106 (0 connections now open)
Tue May 13 14:25:28.941 [initandlisten] connection accepted from 127.0.0.1:51107 #59 (1 connection now open)
Tue May 13 14:25:28.942 [initandlisten] connection accepted from 127.0.0.1:51108 #60 (2 connections now open)
Tue May 13 14:25:28.942 [initandlisten] connection accepted from 127.0.0.1:51109 #61 (3 connections now open)
Tue May 13 14:25:28.943 [initandlisten] connection accepted from 127.0.0.1:51110 #62 (4 connections now open)
Tue May 13 14:25:28.943 [initandlisten] connection accepted from 127.0.0.1:51111 #63 (5 connections now open)
Tue May 13 14:25:28.958 [conn59] end connection 127.0.0.1:51107 (4 connections now open)
Tue May 13 14:25:28.959 [conn60] end connection 127.0.0.1:51108 (3 connections now open)
Tue May 13 14:25:28.959 [conn61] end connection 127.0.0.1:51109 (2 connections now open)
Tue May 13 14:25:28.959 [conn62] end connection 127.0.0.1:51110 (2 connections now open)
Tue May 13 14:25:28.959 [conn63] end connection 127.0.0.1:51111 (0 connections now open)
Tue May 13 14:25:34.036 [initandlisten] connection accepted from 127.0.0.1:51117 #64 (1 connection now open)
Tue May 13 14:25:34.049 [conn64] end connection 127.0.0.1:51117 (0 connections now open)
Tue May 13 14:25:34.053 [initandlisten] connection accepted from 127.0.0.1:51118 #65 (1 connection now open)
Tue May 13 14:25:34.054 [initandlisten] connection accepted from 127.0.0.1:51119 #66 (2 connections now open)
Tue May 13 14:25:34.054 [initandlisten] connection accepted from 127.0.0.1:51120 #67 (3 connections now open)
Tue May 13 14:25:34.055 [initandlisten] connection accepted from 127.0.0.1:51121 #68 (4 connections now open)
Tue May 13 14:25:34.056 [initandlisten] connection accepted from 127.0.0.1:51122 #69 (5 connections now open)
Tue May 13 14:25:34.479 [conn68] end connection 127.0.0.1:51121 (4 connections now open)
Tue May 13 14:25:34.479 [conn69] end connection 127.0.0.1:51122 (4 connections now open)
Tue May 13 14:25:34.479 [conn67] end connection 127.0.0.1:51120 (4 connections now open)
Tue May 13 14:25:34.479 [conn66] end connection 127.0.0.1:51119 (4 connections now open)
Tue May 13 14:25:34.479 [conn65] end connection 127.0.0.1:51118 (4 connections now open)
Tue May 13 14:25:36.954 [initandlisten] connection accepted from 127.0.0.1:51124 #70 (1 connection now open)
Tue May 13 14:25:36.963 [conn70] end connection 127.0.0.1:51124 (0 connections now open)
Tue May 13 14:25:36.966 [initandlisten] connection accepted from 127.0.0.1:51125 #71 (1 connection now open)
Tue May 13 14:25:36.967 [initandlisten] connection accepted from 127.0.0.1:51126 #72 (2 connections now open)
Tue May 13 14:25:36.967 [initandlisten] connection accepted from 127.0.0.1:51127 #73 (3 connections now open)
Tue May 13 14:25:36.968 [initandlisten] connection accepted from 127.0.0.1:51128 #74 (4 connections now open)
Tue May 13 14:25:36.969 [initandlisten] connection accepted from 127.0.0.1:51129 #75 (5 connections now open)
Tue May 13 14:25:37.415 [conn74] end connection 127.0.0.1:51128 (4 connections now open)
Tue May 13 14:25:37.415 [conn75] end connection 127.0.0.1:51129 (4 connections now open)
Tue May 13 14:25:37.415 [conn73] end connection 127.0.0.1:51127 (4 connections now open)
Tue May 13 14:25:37.415 [conn72] end connection 127.0.0.1:51126 (4 connections now open)
Tue May 13 14:25:37.415 [conn71] end connection 127.0.0.1:51125 (4 connections now open)
Tue May 13 14:25:39.832 [initandlisten] connection accepted from 127.0.0.1:51130 #76 (1 connection now open)
Tue May 13 14:25:39.845 [conn76] end connection 127.0.0.1:51130 (0 connections now open)

It doesn't matter if I rename node_modules, but I've also applied the fix in this issue to my local version with no change.

aramk commented 10 years ago

That last issue was caused by meteor failing to start since it's not possible to use npm modules with a package.json like a regular NodeJS app. Once I removed that it worked fine. The issue was that laika's app.js onData() was receiving those errors and not passing them back out. The callback was failing due to the following test: data.toString().match('http://localhost:'). So one improvement could be to print out unexpected data received from meteor to notify the user of errors.