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

Fixed wsdl-test failure #24

Merged
merged 2 commits into from
Sep 30, 2016
Merged

Fixed wsdl-test failure #24

merged 2 commits into from
Sep 30, 2016

Conversation

rashmihunt
Copy link
Contributor

  • Fixed wsdl-test failure
  • Used async module for recursive tests
  • added negative test case for document/encoded style wsdl

@raymondfeng PTAL

@@ -17,7 +17,8 @@
"selectn": "^1.0.20",
"strong-globalize": "^2.8.0",
"xml-crypto": "^0.8.4",
"xmlbuilder": "^8.2.2"
"xmlbuilder": "^8.2.2",
"async": "~1.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use ^2.0.0. A simple way to add it is npm i async --save-dev.

Please make it dev dependency too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

soap.createClient(__dirname + '/wsdl/strict/' + file, {strict: true}, function (err, client) {
assert.ok(!err);
client.describe();
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should call cb(err); here to notify async that this task is done.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Raymond PTAL

client.describe();
});
});
done();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done is called too early. You need to pass done as the last argument to async.each so that done will be called once async finishes all tasks or one of them fails.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

var expectedError = false;
try {
client.describe();
} catch (err) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add done(new Error('An error should have been thrown'));.

@rashmihunt rashmihunt merged commit 6f24233 into master Sep 30, 2016
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

Successfully merging this pull request may close these issues.

None yet

2 participants