-
Notifications
You must be signed in to change notification settings - Fork 163
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
Conversation
@@ -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" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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(); | ||
}); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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'));
.
@raymondfeng PTAL