Closed MWers closed 9 years ago
Could you give us your nodejs version so we can try to reproduce it on travis?
Sure thing, please let me know if there's any other info I can give you:
$ node -v
v0.10.29
Do you have full stack trace? It passes fine on travis https://travis-ci.org/3scale/3scale_ws_api_for_nodejs/jobs/46478423 Anyway, I issued #19 that updates vows. But still would be nice to know why it failed for you.
It doesn't print a stack trace on error. I'm running it now with the --trace
option and will post that when it's complete. Or is there a better way to isolate it?
I've posted the results of running tests with the --trace
option here:
https://www.dropbox.com/s/oksjkkiht1kmv6f/3scale-node-test.trace.gz?dl=0
Hopefully I've properly scrubbed it of my TEST_3SCALE_PROVIDER_KEY
. :-) I used the TEST_3SCALE_APP_ID
and TEST_3SCALE_APP_KEY
values that are in the .travis.yml
file so I left those in the trace.
I'm fairly new to Node.js so it's hard for me to tell exactly what's going on but it looks like it recursively iterates over the section of the test at lines 100-101 of client_test.coffee
until it hits the stack size max.
https://github.com/3scale/3scale_ws_api_for_nodejs/blob/master/test/client_test.coffee#L100
Incidentally, after I upgraded vows to 0.8.x
, that section of the tests still fails for me but not with the RangeError:
$ TEST_3SCALE_PROVIDER_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx TEST_3SCALE_APP_ID=4d4b20b9 TEST_3SCALE_APP_KEY=ecce202ecc2eb8dc7a499c34a34d5987 ./node_modules/.bin/vows test/* --spec
♢ Basic test for the 3Scale::AuthorizeResponse
A authorize_response Should
✓ have a add_usage_report method
✓ can push a new UsageReport
♢ Basic test for the 3Scale::Client
- The oauth_authorize method should
A client
✓ should throw an exception if init without provider_key
✓ should have an default host
✓ can change the default host
✓ should have an authorize method
✓ should throw an exception if authorize method is called without :app_id
✓ should have an oauth_authorize method
✓ should throw an exception if oauth_authorize method is called without :app_id
✓ should have an authorize_with_user_key method
✓ should throw an exception if authorize_with_user_key is called without :user_key
✓ should have an authrep method
✓ should throw an exception if authrep called without :app_id
✓ should have an authrep_with_user_key method
✓ should throw an exception if authrep_with_user_key is called without :user_key
The authorize method should
✗ call the callback with the AuthorizeResponse
» expected true, got false // /Users/matt/Dropbox/Projects/Surfline/GitHub/3scale_ws_api_for_nodejs/test/client_test.coffee:101
In the transaction method should
✓ give a success response with the correct params
The Event Emitter
✓ call the callback with a error response if app_id was wrong
Request headers in report calls
✓ should include the 3scale user agent
✓ should include the default 3scale host
Request headers in authorize calls
✓ should include the 3scale user agent
✓ should include the default 3scale host
♢ Basic test for the 3Scale::Response
A response Should
✓ have a success method
✓ have a code & message null after a success
✓ have a error method
✓ have a custom code and message after error
✓ have a custom code and null message after error
✓ have a is_success method
✓ be true after a call to success method
✓ be false after a error method
✗ Broken » 29 honored ∙ 1 broken ∙ 1 pending (0.605s)
Thanks!
When running tests, I received the following error:
This error would occur every time I ran tests but it would occur at a different point in the tests. The following two examples were run consecutively 10 seconds apart:
To fix this, I upgraded
vows
to the following inpackage.json
: