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

About test #10

Closed
stevenfrog opened this issue Dec 7, 2014 · 9 comments
Closed

About test #10

stevenfrog opened this issue Dec 7, 2014 · 9 comments
Assignees
Labels

Comments

@stevenfrog
Copy link

I git clone this contest.
"npm start" works fine.
But "npm test" can not:

stevenfrog@frog-Z87P:~/temp/actionhero-tutorial$ npm test

> actionhero_tutorial@0.0.1 test /home/stevenfrog/temp/actionhero-tutorial
> mocha




  actionhero Tests
    1) "before all" hook

  integration
    starting test server...
    2) "before all" hook

  integration
    restarting test server...
    3) "before all" hook

  integration
    restarting test server...
    4) "before all" hook


  0 passing (21s)
  4 failing

  1) actionhero Tests "before all" hook:
     Error: timeout of 5000ms exceeded
      at null.<anonymous> (/home/stevenfrog/temp/actionhero-tutorial/node_modules/mocha/lib/runnable.js:158:19)
      at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)

  2) integration "before all" hook:
     Error: timeout of 5000ms exceeded
      at null.<anonymous> (/home/stevenfrog/temp/actionhero-tutorial/node_modules/mocha/lib/runnable.js:158:19)
      at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)

  3) integration "before all" hook:
     Error: timeout of 5000ms exceeded
      at null.<anonymous> (/home/stevenfrog/temp/actionhero-tutorial/node_modules/mocha/lib/runnable.js:158:19)
      at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)

  4) integration "before all" hook:
     Error: timeout of 5000ms exceeded
      at null.<anonymous> (/home/stevenfrog/temp/actionhero-tutorial/node_modules/mocha/lib/runnable.js:158:19)
      at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)



npm ERR! Test failed.  See above for more details.
npm ERR! not ok code 0

my env is:

stevenfrog@frog-Z87P:~/temp/actionhero-tutorial$ uname -a
Linux frog-Z87P 3.11.0-26-generic #45~precise1-Ubuntu SMP Tue Jul 15 04:02:35 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
@evantahler
Copy link
Member

hmm... I just re-tested a fresh clone on a new ubuntu server and it all works OK. If you want to dig into this deeper, change the logging level (./config/logger.js) for the test env to debug. Perhaps we'll learn more.

@stevenfrog
Copy link
Author

I also can not get enough info when logging level is debug:

  actionhero Tests
    1) "before all" hook

  integration
    starting test server...
    2) "before all" hook

  integration
    restarting test server...
    3) "before all" hook

  integration
    restarting test server...
    4) "before all" hook


  0 passing (21s)
  4 failing

  1) actionhero Tests "before all" hook:
     Error: timeout of 5000ms exceeded
      at null.<anonymous> (/home/stevenfrog/temp/actionhero-tutorial/node_modules/mocha/lib/runnable.js:158:19)
      at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)

  2) integration "before all" hook:
     Error: timeout of 5000ms exceeded
      at null.<anonymous> (/home/stevenfrog/temp/actionhero-tutorial/node_modules/mocha/lib/runnable.js:158:19)
      at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)

  3) integration "before all" hook:
     Error: timeout of 5000ms exceeded
      at null.<anonymous> (/home/stevenfrog/temp/actionhero-tutorial/node_modules/mocha/lib/runnable.js:158:19)
      at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)

  4) integration "before all" hook:
     Error: timeout of 5000ms exceeded
      at null.<anonymous> (/home/stevenfrog/temp/actionhero-tutorial/node_modules/mocha/lib/runnable.js:158:19)
      at Timer.listOnTimeout [as ontimeout] (timers.js:112:15)



npm ERR! Test failed.  See above for more details.
npm ERR! not ok code 0

I think the server is not started correctly.

@evantahler
Copy link
Member

Sorry... you need to:

  • comment out the overrides in for the test environment [link]
  • change the default logging level to "debug"

@stevenfrog
Copy link
Author

I can show some part of them:

  actionhero Tests
2014-12-09 15:51:56 - notice: *** starting actionhero ***
2014-12-09 15:51:56 - debug: Logger loaded.  Possible levels include:  0=emerg, 1=alert, 2=crit, 3=error, 4=warning, 5=notice, 6=info, 7=debug
2014-12-09 15:51:56 - warning: running with fakeredis
2014-12-09 15:51:56 - debug: action loaded: postAdd @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/blog.js
2014-12-09 15:51:56 - debug: action loaded: postView @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/blog.js
2014-12-09 15:51:56 - debug: action loaded: postsList @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/blog.js
2014-12-09 15:51:56 - debug: action loaded: postEdit @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/blog.js
2014-12-09 15:51:56 - debug: action loaded: postDelete @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/blog.js
2014-12-09 15:51:56 - debug: action loaded: commentAdd @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/blog.js
2014-12-09 15:51:56 - debug: action loaded: commentsView @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/blog.js
2014-12-09 15:51:56 - debug: action loaded: commentDelete @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/blog.js
2014-12-09 15:51:56 - debug: action loaded: showDocumentation @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/showDocumentation.js
2014-12-09 15:51:56 - debug: action loaded: status @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/status.js
2014-12-09 15:51:56 - debug: action loaded: userAdd @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/users.js
2014-12-09 15:51:56 - debug: action loaded: userDelete @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/users.js
2014-12-09 15:51:56 - debug: action loaded: usersList @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/users.js
2014-12-09 15:51:56 - debug: action loaded: authenticate @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/users.js
2014-12-09 15:51:56 - debug: task loaded: stats, /home/stevenfrog/temp/actionhero-tutorial/tasks/stats.js
2014-12-09 15:51:56 - debug: 11 routes loaded from undefined
2014-12-09 15:51:56 - debug: 14 simple routes loaded from action names
2014-12-09 15:51:56 - debug: routes: get=[path=/users, action=usersList, path=/comments/:userName/:title, action=commentsView, path=/post/:userName/:title, action=postView, path=/posts/:userName/, action=postsList, path=/postAdd, action=postAdd, path=/postView, action=postView, path=/postsList, action=postsList, path=/postEdit, action=postEdit, path=/postDelete, action=postDelete, path=/commentAdd,
...
tion=userAdd, path=/userDelete, action=userDelete, path=/usersList, action=usersList, path=/authenticate, action=authenticate]
2014-12-09 15:51:56 - debug: initialized server: socket
2014-12-09 15:51:56 - debug: initialized server: web
2014-12-09 15:51:56 - debug: initialized server: websocket
2014-12-09 15:51:56 - debug: initialized server: twitter
2014-12-09 15:51:56 - info: running custom initializer: blog
2014-12-09 15:51:56 - info: running custom initializer: middleware
2014-12-09 15:51:56 - info: running custom initializer: users
2014-12-09 15:51:56 - info: environment: test
2014-12-09 15:51:56 - notice: pid: 572
2014-12-09 15:51:56 - info: ensuring the existence of the chatRoom: defaultRoom
2014-12-09 15:51:56 - info: ensuring the existence of the chatRoom: otherRoom
2014-12-09 15:51:56 - info: ensuring the existence of the chatRoom: secureRoom
2014-12-09 15:51:56 - info: ensuring the existence of the chatRoom: twitter
2014-12-09 15:51:56 - notice: starting server: socket
2014-12-09 15:51:56 - notice: starting server: web
2014-12-09 15:51:56 - notice: starting server: websocket
2014-12-09 15:51:56 - notice: webSockets bound to 0.0.0.0:8081
2014-12-09 15:51:56 - debug: wrote /home/stevenfrog/temp/actionhero-tutorial/public/javascript/actionheroClient.js
2014-12-09 15:51:56 - debug: wrote /home/stevenfrog/temp/actionhero-tutorial/public/javascript/actionheroClient.min.js
2014-12-09 15:51:56 - notice: starting server: twitter
2014-12-09 15:51:56 - warning: loading the testServer
2014-12-09 15:51:56 - debug:  > start: configLoader
2014-12-09 15:51:56 - debug:  > start: pids
2014-12-09 15:51:56 - debug:  > start: stats
2014-12-09 15:51:56 - debug:  > start: redis
2014-12-09 15:51:56 - debug:  > start: connections
2014-12-09 15:51:56 - debug:  > start: chatRoom
2014-12-09 15:51:56 - debug:  > start: tasks
2014-12-09 15:51:56 - debug:  > start: specHelper
2014-12-09 15:51:56 - debug:  > start: resque
2014-12-09 15:51:56 - debug: connected to the cache with 0 existing objects
2014-12-09 15:51:56 - info: actionhero member test-server has joined the cluster
2014-12-09 15:51:56 - debug:  > start: cache
    1) "before all" hook
2014-12-09 15:52:01 - alert: Shutting down open servers and stopping task processing
2014-12-09 15:52:01 - debug:  > stop: resque
2014-12-09 15:52:01 - debug:  > stop: stats
2014-12-09 15:52:01 - debug:  > stop: redis
2014-12-09 15:52:01 - debug:  > stop: connections
2014-12-09 15:52:01 - debug:  > stop: chatRoom
2014-12-09 15:52:01 - debug:  > stop: servers
2014-12-09 15:52:01 - notice: stopping server: socket
2014-12-09 15:52:01 - notice: stopping server: web
2014-12-09 15:52:01 - notice: stopping server: websocket
2014-12-09 15:52:01 - notice: stopping server: twitter
2014-12-09 15:52:01 - notice: stopping server: testServer
2014-12-09 15:52:01 - debug: server stopped: socket
2014-12-09 15:52:01 - debug: server stopped: twitter
2014-12-09 15:52:01 - debug: server stopped: testServer
2014-12-09 15:52:01 - debug: server stopped: web
2014-12-09 15:52:01 - debug: server stopped: websocket
2014-12-09 15:52:01 - info: actionhero member test-server has left the cluster
2014-12-09 15:52:01 - alert: The actionhero has been stopped
2014-12-09 15:52:01 - debug: ***

  integration
    starting test server...
2014-12-09 15:52:01 - notice: *** starting actionhero ***
2014-12-09 15:52:01 - debug: Logger loaded.  Possible levels include:  0=emerg, 1=alert, 2=crit, 3=error, 4=warning, 5=notice, 6=info, 7=debug
2014-12-09 15:52:01 - warning: running with fakeredis
2014-12-09 15:52:01 - debug: action loaded: postAdd @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/blog.js
2014-12-09 15:52:01 - debug: action loaded: postView @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/blog.js
2014-12-09 15:52:01 - debug: action loaded: postsList @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/blog.js
2014-12-09 15:52:01 - debug: action loaded: postEdit @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/blog.js
2014-12-09 15:52:01 - debug: action loaded: postDelete @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/blog.js
2014-12-09 15:52:01 - debug: action loaded: commentAdd @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/blog.js
2014-12-09 15:52:01 - debug: action loaded: commentsView @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/blog.js
2014-12-09 15:52:01 - debug: action loaded: commentDelete @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/blog.js
2014-12-09 15:52:01 - debug: action loaded: showDocumentation @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/showDocumentation.js
2014-12-09 15:52:01 - debug: action loaded: status @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/status.js
2014-12-09 15:52:01 - debug: action loaded: userAdd @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/users.js
2014-12-09 15:52:01 - debug: action loaded: userDelete @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/users.js
2014-12-09 15:52:01 - debug: action loaded: usersList @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/users.js
2014-12-09 15:52:01 - debug: action loaded: authenticate @ v1, /home/stevenfrog/temp/actionhero-tutorial/actions/users.js
2014-12-09 15:52:01 - debug: task loaded: stats, /home/stevenfrog/temp/actionhero-tutorial/tasks/stats.js
2014-12-09 15:52:01 - debug: 11 routes loaded from undefined
2014-12-09 15:52:01 - debug: 14 simple routes loaded from action names

There is some warning:
2014-12-09 15:51:56 - warning: running with fakeredis
2014-12-09 15:51:56 - warning: loading the testServer

@evantahler evantahler self-assigned this Dec 10, 2014
@evantahler
Copy link
Member

These lines are expected:

2014-12-09 15:51:56 - warning: running with fakeredis
2014-12-09 15:51:56 - warning: loading the testServer

It looks like there is an initializer that isn't booting... can you share your node and npm versions?

evan@ubuntu:~/PROJECTS/actionhero-tutorial$ node --version
v0.10.25
evan@ubuntu:~/PROJECTS/actionhero-tutorial$ npm --version
1.3.10

@stevenfrog
Copy link
Author

This is my version:

stevenfrog@frog-Z87P:~/temp/actionhero-tutorial$ node --version
v0.10.33
stevenfrog@frog-Z87P:~/temp/actionhero-tutorial$ npm --version
1.4.28

@evantahler
Copy link
Member

huh... I'm sorry, but I can't reproduce this to help you out.

@jtmarmon
Copy link

I'm not 100% sure but I think when this happened to me I had an initializer that wasn't properly calling next() due to a silently failing error. I would root around in your initializers and make sure that they're all completing properly.

@evantahler
Copy link
Member

good idea @jtmarmon. However, a number of others have confirmed that this project works OK when cloned.

Sadly, I'm going to close this out as "cannot replicate"

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

No branches or pull requests

3 participants