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

Run all tests in break-out modules (node-xmpp-*) #208

Merged
merged 4 commits into from
Dec 10, 2013
Merged

Conversation

lloydwatkin
Copy link
Member

As per title. Means we can migrate the tests and still see them all running from node-xmpp himself/herself/itself.

@lloydwatkin
Copy link
Member Author

Waiting for #207 until tests will pass

@lloydwatkin
Copy link
Member Author

Pushed the latest changes, but it seems that the bosh tests in node-xmpp-server don't like being run in this fashion. c2s never gets created so we get an error.

These failing tests run fine directly from node-xmpp-server. But there's actually there's some different errors around 👍

 1) SASL server should accept plain authentication:
     Error: timeout of 2000ms exceeded
      at null.<anonymous> (/Users/lloyd/Dropbox/code/xmpp-ftw/node-xmpp/node-xmpp/node_modules/node-xmpp-server/node_modules/grunt-mocha-cli/node_modules/mocha/lib/runnable.js:165:14)
      at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)

CC'ing @chris-rock as you've being doing some work around the auth stuff (I'm guessing this might just be my system).

@chris-rock
Copy link
Member

@lloydwatkin have you bumped the server version?

@lloydwatkin
Copy link
Member Author

@chris-rock yes I have. On my local system I just use symlinked versions of libraries in my node_modules folder.

I've got 1 failing test as follows:

  BOSH client/server
    client
      1) "before all" hook

  49 passing (2s)
  1 failing

  1) BOSH client/server "before all" hook:
     Uncaught Error: listen EADDRINUSE
      at errnoException (net.js:901:11)
      at Server._listen2 (net.js:1039:14)
      at listen (net.js:1061:10)
      at Server.listen (net.js:1127:5)
      at Context.<anonymous> (/home/lloyd/Dropbox/code/xmpp-ftw/node-xmpp/node-xmpp/node_modules/node-xmpp-server/test/bosh.js:19:12)
      at Hook.Runnable.run (/home/lloyd/Dropbox/code/xmpp-ftw/node-xmpp/node-xmpp/node_modules/grunt-mocha-cli/node_modules/mocha/lib/runnable.js:194:15)
      at next (/home/lloyd/Dropbox/code/xmpp-ftw/node-xmpp/node-xmpp/node_modules/grunt-mocha-cli/node_modules/mocha/lib/runner.js:249:10)
      at Object._onImmediate (/home/lloyd/Dropbox/code/xmpp-ftw/node-xmpp/node-xmpp/node_modules/grunt-mocha-cli/node_modules/mocha/lib/runner.js:261:5)
      at processImmediate [as _immediateCallback] (timers.js:330:15)

@lloydwatkin
Copy link
Member Author

Ok the problem is that bosh-test.js exists in both node-xmpp and node-xmpp-server and that for some reason the after() method is not being called in the test to kill the bosh server (so the second run of the test fails as the server is already up).

Fixed by removing the version of bosh-test.js from node-xmpp. Raising another issue about after() not being called now (probably a simple fix).

@lloydwatkin
Copy link
Member Author

Ok after() is being called, we're just not waiting for the server to actually stop.

@lloydwatkin
Copy link
Member Author

Ready for merge anyhow

@lloydwatkin lloydwatkin mentioned this pull request Dec 8, 2013
@chris-rock
Copy link
Member

👍

@lloydwatkin
Copy link
Member Author

Could someone merge this please :)

chris-rock added a commit that referenced this pull request Dec 10, 2013
Run all tests in break-out modules (node-xmpp-*)
@chris-rock chris-rock merged commit c9fc57d into master Dec 10, 2013
@chris-rock
Copy link
Member

@lloydwatkin done!

@lloydwatkin lloydwatkin deleted the test-runner branch December 10, 2013 09:22
@lloydwatkin
Copy link
Member Author

Excellent, thanks @chris-rock. Won't push a new version out as it doesn't seem necessary at this point.

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

Successfully merging this pull request may close these issues.

2 participants