Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client tests sometimes hang up in mocha's example #148

Open
tclavijod opened this issue Apr 1, 2015 · 3 comments
Open

Client tests sometimes hang up in mocha's example #148

tclavijod opened this issue Apr 1, 2015 · 3 comments

Comments

@tclavijod
Copy link

Hi, I just downloaded the velocity examples, tried running velocity's CLI meteor --test and sometimes it hangs up on the client tests (they never run).

I tried the latest versions of meteor (1.1) and velocity:core (0.5.1) and it hangs up at the beginning (neither server nor client tests run).

The result I get when debugging is this:

stream error Network error: ws://localhost:3000/websocket: connect ECONNREFUSED
=> A patch (Meteor 1.0.4.2) for your current release is available!
Update this project now with 'meteor update --patch'.
I20150401-16:49:38.802(-4)? [velocity] adding velocity core
I20150401-16:49:38.805(-4)? [velocity] Not adding mirror-registrar because NODE_ENV is development and IS_MIRROR is false
I20150401-16:49:39.590(-4)? [node-soft-mirror] adding server code
I20150401-16:49:39.592(-4)? [velocity] Velocity not started. Queueing func
I20150401-16:49:39.593(-4)? [velocity] Server startup
I20150401-16:49:39.593(-4)? [velocity] app dir /home/developer/Development/Meteor/velocity-examples-master/leaderboard-mocha
I20150401-16:49:39.594(-4)? [velocity] config = {
I20150401-16:49:39.594(-4)? "mocha": {
I20150401-16:49:39.594(-4)? "regex": "^tests/mocha/.+.(js|coffee|litcoffee|coffee.md)$",
I20150401-16:49:39.594(-4)? "name": "mocha",
I20150401-16:49:39.594(-4)? "regexp": {}
I20150401-16:49:39.594(-4)? }
I20150401-16:49:39.595(-4)? }
I20150401-16:49:39.595(-4)? [velocity] resetting the world
I20150401-16:49:39.596(-4)? [velocity] frameworks with disable auto reset: []
I20150401-16:49:39.651(-4)? [velocity-node-mirror] Server restarted.
I20150401-16:49:39.652(-4)? [velocity-node-mirror] Aggressively restarting all mirrors
I20150401-16:49:39.653(-4)? [node-soft-mirror] Aggressively reload client
I20150401-16:49:39.714(-4)? [velocity] Mirror requested { framework: 'mocha',
I20150401-16:49:39.714(-4)? rootUrlPath: '?mocha=true',
I20150401-16:49:39.714(-4)? port: 5000,
I20150401-16:49:39.714(-4)? host: 'http://localhost:5000/',
I20150401-16:49:39.714(-4)? rootUrl: 'http://localhost:5000/?mocha=true' }
I20150401-16:49:39.715(-4)? [node-soft-mirror]: LongRunningChildProcess.constructor(taskName=mocha)
I20150401-16:49:39.715(-4)? [node-soft-mirror]: LongRunningChildProcess.readPid()
I20150401-16:49:39.716(-4)? [node-soft-mirror]: LongRunningChildProcess.readPid returns null
I20150401-16:49:39.716(-4)? [node-soft-mirror]: LongRunningChildProcess.isRunning returns false
I20150401-16:49:39.718(-4)? [node-soft-mirror]: LongRunningChildProcess.spawn() { command: '/home/developer/.meteor/packages/meteor-tool/.1.0.43.pv9wg1++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node',
I20150401-16:49:39.718(-4)? args: [ '/home/developer/Development/Meteor/velocity-examples-master/leaderboard-mocha/.meteor/local/build/main.js' ],
I20150401-16:49:39.718(-4)? options:
I20150401-16:49:39.718(-4)? { detached: true,
I20150401-16:49:39.718(-4)? cwd: '/home/developer/Development/Meteor/velocity-examples-master/leaderboard-mocha',
I20150401-16:49:39.718(-4)? env:
I20150401-16:49:39.719(-4)? { PORT: 5000,
I20150401-16:49:39.719(-4)? HOST: 'http://localhost:5000/',
I20150401-16:49:39.719(-4)? ROOT_URL_PATH: '?mocha=true',
I20150401-16:49:39.719(-4)? ROOT_URL: 'http://localhost:5000/?mocha=true',
I20150401-16:49:39.719(-4)? FRAMEWORK: 'mocha',
I20150401-16:49:39.719(-4)? MONGO_URL: 'mongodb://127.0.0.1:3001/mocha',
I20150401-16:49:39.720(-4)? PARENT_URL: 'http://localhost:3000/',
I20150401-16:49:39.720(-4)? IS_MIRROR: true,
I20150401-16:49:39.720(-4)? METEOR_SETTINGS: '{}',
I20150401-16:49:39.720(-4)? LC_PAPER: 'es_BO.UTF-8',
I20150401-16:49:39.720(-4)? LC_ADDRESS: 'es_BO.UTF-8',
I20150401-16:49:39.720(-4)? LC_MONETARY: 'es_BO.UTF-8',
I20150401-16:49:39.720(-4)? SHELL: '/bin/bash',
I20150401-16:49:39.720(-4)? TERM: 'xterm',
I20150401-16:49:39.721(-4)? LC_NUMERIC: 'es_BO.UTF-8',
I20150401-16:49:39.721(-4)? OLDPWD: '/home/developer/.meteor/packages/meteor-tool/1.0.43/mt-os.linux.x86_64',
I20150401-16:49:39.721(-4)? USER: 'root',
I20150401-16:49:39.721(-4)? LC_TELEPHONE: 'es_BO.UTF-8',
I20150401-16:49:39.721(-4)? LS_COLORS: 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:
.tar=01;31:.tgz=01;31:.arj=01;31:.taz=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.zip=01;31:.z=01;31:.Z=01;31:.dz=01;31:.gz=01;31:.lz=01;31:.xz=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.jpg=01;35:.jpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.webm=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.axv=01;35:.anx=01;35:.ogv=01;35:.ogx=01;35:.aac=00;36:.au=00;36:.flac=00;36:.mid=00;36:.midi=00;36:.mka=00;36:.mp3=00;36:.mpc=00;36:.ogg=00;36:.ra=00;36:.wav=00;36:.axa=00;36:.oga=00;36:.spx=00;36:_.xspf=00;36:',
I20150401-16:49:39.721(-4)? SUDO_USER: 'developer',
I20150401-16:49:39.721(-4)? SUDO_UID: '1720191350',
I20150401-16:49:39.722(-4)? USERNAME: 'root',
I20150401-16:49:39.722(-4)? VELOCITY_DEBUG_MIRROR: '1',
I20150401-16:49:39.722(-4)? MAIL: '/var/mail/root',
I20150401-16:49:39.722(-4)? PATH: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
I20150401-16:49:39.722(-4)? LC_IDENTIFICATION: 'es_BO.UTF-8',
I20150401-16:49:39.722(-4)? PWD: '/home/developer/Development/Meteor/velocity-examples-master/leaderboard-mocha',
I20150401-16:49:39.723(-4)? LANG: 'en_US.UTF-8',
I20150401-16:49:39.723(-4)? LC_MEASUREMENT: 'es_BO.UTF-8',
I20150401-16:49:39.723(-4)? https_proxy: 'http://172.20.240.5:8080',
I20150401-16:49:39.723(-4)? SHLVL: '0',
I20150401-16:49:39.723(-4)? SUDO_COMMAND: '/usr/local/bin/meteor --test',
I20150401-16:49:39.723(-4)? HOME: '/home/developer',
I20150401-16:49:39.724(-4)? LANGUAGE: 'en_US:',
I20150401-16:49:39.724(-4)? VELOCITY_DEBUG: '1',
I20150401-16:49:39.724(-4)? LOGNAME: 'root',
I20150401-16:49:39.724(-4)? SUDO_GID: '1720189441',
I20150401-16:49:39.724(-4)? DISPLAY: ':0.0',
I20150401-16:49:39.725(-4)? DEBUG: '1',
I20150401-16:49:39.725(-4)? LC_TIME: 'es_BO.UTF-8',
I20150401-16:49:39.725(-4)? LC_NAME: 'es_BO.UTF-8',
I20150401-16:49:39.728(-4)? XAUTHORITY: '/home/developer/.Xauthority',
I20150401-16:49:39.728(-4)? COLORTERM: 'mate-terminal',
I20150401-16:49:39.728(-4)? MOBILE_DDP_URL: 'http://localhost:3000',
I20150401-16:49:39.728(-4)? MOBILE_ROOT_URL: 'http://localhost:3000',
I20150401-16:49:39.729(-4)? MONGO_OPLOG_URL: 'mongodb://127.0.0.1:3001/local',
I20150401-16:49:39.729(-4)? APP_ID: 'naqs8m38qtjn1e31wah',
I20150401-16:49:39.729(-4)? NODE_ENV: 'development',
I20150401-16:49:39.729(-4)? HTTP_FORWARDED_COUNT: '1',
I20150401-16:49:39.729(-4)? METEOR_SHELL_DIR: '/home/developer/Development/Meteor/velocity-examples-master/leaderboard-mocha/.meteor/local/shell',
I20150401-16:49:39.729(-4)? METEOR_PARENT_PID: '15867',
I20150401-16:49:39.729(-4)? METEOR_PRINT_ON_LISTEN: 'true',
I20150401-16:49:39.730(-4)? NODE_PATH: '' } } }
I20150401-16:49:39.730(-4)? [node-soft-mirror]: LongRunningChildProcess.isRunning returns false
I20150401-16:49:39.730(-4)? [node-soft-mirror]: /home/developer/Development/Meteor/velocity-examples-master/leaderboard-mocha/.meteor/local/build/programs/server/assets/packages/velocity_node-soft-mirror/lib/spawnScript.js
I20150401-16:49:39.730(-4)? [node-soft-mirror]: The pid of the main Meteor app process is 15867
I20150401-16:49:39.730(-4)? [node-soft-mirror]: LongRunningChildProcess.spawn is spawning 'node'
I20150401-16:49:39.730(-4)? [node-soft-mirror]: LongRunningChildProcess._setPid(pid=16005)
I20150401-16:49:39.731(-4)? [node-soft-mirror]: Saving mocha pid 16005 to /home/developer/Development/Meteor/velocity-examples-master/leaderboard-mocha/.meteor/local/run/mocha.pid
I20150401-16:49:39.731(-4)? [velocity-node-mirror] Mirror process forked with pid 16005
I20150401-16:49:39.771(-4)? [velocity] Target framework for tests/mocha/client/clientTest.js is mocha
I20150401-16:49:39.775(-4)? [velocity] Target framework for tests/mocha/server/serverTest.js is mocha
I20150401-16:49:39.784(-4)? [velocity] File scan complete, now watching /tests
I20150401-16:49:39.786(-4)? [velocity] Triggering queued startup functions
I20150401-16:49:39.805(-4)? [proxy-package-sync] Test file added tests/mocha/client/clientTest.js
I20150401-16:49:39.814(-4)? [proxy-package-sync] Test file added tests/mocha/server/serverTest.js
I20150401-16:49:40.016(-4)? [proxy-package-sync] Checking if a new package.js needs to be written because {} undefined
I20150401-16:49:40.017(-4)? [proxy-package-sync] Generating in-memory package.js
I20150401-16:49:40.018(-4)? [proxy-package-sync] Fixture files list length: 0
I20150401-16:49:40.020(-4)? [proxy-package-sync] Test files list length: 2
I20150401-16:49:40.021(-4)? [proxy-package-sync] Test file will be included in mirror tests/mocha/client/clientTest.js
I20150401-16:49:40.022(-4)? [proxy-package-sync] Test file will be included in mirror tests/mocha/server/serverTest.js
I20150401-16:49:40.025(-4)? [proxy-package-sync] Comparing:
I20150401-16:49:40.026(-4)? [proxy-package-sync] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
I20150401-16:49:40.027(-4)? [proxy-package-sync] - - - - - - - - - currentPackageJS: - - - - - - - - - - - - -
I20150401-16:49:40.033(-4)? Package.describe({
I20150401-16:49:40.033(-4)? name: "velocity:test-proxy",
I20150401-16:49:40.033(-4)? summary: "Dynamically created package to expose test files to mirrors",
I20150401-16:49:40.033(-4)? version: "0.0.4",
I20150401-16:49:40.033(-4)? debugOnly: true
I20150401-16:49:40.033(-4)? });
I20150401-16:49:40.033(-4)?
I20150401-16:49:40.034(-4)? Package.onUse(function (api) {
I20150401-16:49:40.034(-4)? api.use("coffeescript", ["client", "server"]);
I20150401-16:49:40.034(-4)? api.add_files("tests/mocha/client/clientTest.js",["client"]);
I20150401-16:49:40.034(-4)? api.add_files("tests/mocha/server/serverTest.js",["server"]);
I20150401-16:49:40.034(-4)? });
I20150401-16:49:40.040(-4)? [proxy-package-sync] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
I20150401-16:49:40.040(-4)? [proxy-package-sync] - - - - - - - - - generatedPackageJsContent - - - - - - - - -
I20150401-16:49:40.043(-4)? Package.describe({
I20150401-16:49:40.043(-4)? name: "velocity:test-proxy",
I20150401-16:49:40.043(-4)? summary: "Dynamically created package to expose test files to mirrors",
I20150401-16:49:40.043(-4)? version: "0.0.4",
I20150401-16:49:40.043(-4)? debugOnly: true
I20150401-16:49:40.044(-4)? });
I20150401-16:49:40.044(-4)?
I20150401-16:49:40.044(-4)? Package.onUse(function (api) {
I20150401-16:49:40.045(-4)? api.use("coffeescript", ["client", "server"]);
I20150401-16:49:40.045(-4)? api.add_files("tests/mocha/client/clientTest.js",["client"]);
I20150401-16:49:40.054(-4)? api.add_files("tests/mocha/server/serverTest.js",["server"]);
I20150401-16:49:40.054(-4)? });
I20150401-16:49:40.054(-4)? [proxy-package-sync] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
I20150401-16:49:40.054(-4)? [proxy-package-sync] No changes to package.js file required
I20150401-16:49:40.619(-4)? [velocity] Mirror registered. Handshaking with mirror...
I20150401-16:49:40.925(-4)? stream error Network error: ws://localhost:5000/websocket: connect ECONNREFUSED
I20150401-16:49:40.940(-4)? stream error Network error: ws://localhost:5000/websocket: connect ECONNREFUSED
I20150401-16:49:40.957(-4)? stream error Network error: ws://localhost:5000/websocket: connect ECONNREFUSED
I20150401-16:49:46.797(-4)? [velocity] Connected to mirror, setting state to ready { framework: 'mocha',
I20150401-16:49:46.797(-4)? port: '5000',
I20150401-16:49:46.797(-4)? host: 'http://localhost:5000/' }
PASSED mocha : Server initialization => should insert players into the database after server start
-->(hangs in this line)<--

And I work behind a proxy, any ideas?

@rissem
Copy link
Collaborator

rissem commented Apr 1, 2015

Thanks for reporting. Are you able to manually load http://localhost:3000 and http://localhost:5000 when your server is running w/ tests? What do you mean by work behind a proxy?

@tclavijod
Copy link
Author

With localhost:3000 the tests finish running right away (on both the html reporter and CLI), and with localhost:5000 nothing changes (not even on the html reporter), the client tests don't run.

As for the proxy, I mean that my work environment is set with a corporate proxy, so I have to run velocity with proxy settings (otherwise it won't start at all)...for example I have to run
'sudo https_proxy=proxy:port meteor --test' instead of just 'meteor --test', just letting you know in case it matters :)

@tclavijod
Copy link
Author

Hi!...as an update, I've tried same examples over a non-proxy environment and it's the same results...it hangs sometimes after the server tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants