Fixed some issues with the Node tests

pull/3760/head
murgatroid99 9 years ago
parent fd994f11b8
commit eb185de4cb
  1. 2
      src/node/src/credentials.js
  2. 2
      src/node/test/async_test.js
  3. 2
      src/node/test/channel_test.js
  4. 10
      src/node/test/credentials_test.js

@ -153,7 +153,7 @@ exports.combineCallCredentials = function() {
current = current.compose(arguments[i]);
}
return current;
}
};
/**
* Create an insecure credentials object. This is used to create a channel that

@ -57,7 +57,7 @@ describe('Async functionality', function() {
grpc.ServerCredentials.createInsecure());
server.start();
math_client = new math.Math('localhost:' + port_num,
grpc.Credentials.createInsecure());
grpc.credentials.createInsecure());
done();
});
after(function() {

@ -149,7 +149,7 @@ describe('channel', function() {
afterEach(function() {
channel.close();
});
it.only('should time out if called alone', function(done) {
it('should time out if called alone', function(done) {
var old_state = channel.getConnectivityState();
var deadline = new Date();
deadline.setSeconds(deadline.getSeconds() + 1);

@ -130,8 +130,8 @@ describe('client credentials', function() {
callback(null, metadata);
};
var creds = grpc.credentials.createFromMetadataGenerator(metadataUpdater);
var combined_creds = grpc.credentials.combineCredentials(client_ssl_creds,
creds);
var combined_creds = grpc.credentials.combineChannelCredentials(
client_ssl_creds, creds);
var client = new Client('localhost:' + port, combined_creds,
client_options);
var call = client.unary({}, function(err, data) {
@ -150,8 +150,8 @@ describe('client credentials', function() {
callback(null, metadata);
};
var creds = grpc.credentials.createFromMetadataGenerator(metadataUpdater);
var combined_creds = grpc.credentials.combineCredentials(client_ssl_creds,
creds);
var combined_creds = grpc.credentials.combineChannelCredentials(
client_ssl_creds, creds);
var client = new Client('localhost:' + port, combined_creds,
client_options);
var call = client.unary({}, function(err, data) {
@ -231,7 +231,7 @@ describe('client credentials', function() {
updater_creds, alt_updater_creds);
var call = client.unary({}, function(err, data) {
assert.ifError(err);
}, null, {credentials: updater_creds});
}, null, {credentials: combined_updater});
call.on('metadata', function(metadata) {
assert.deepEqual(metadata.get('plugin_key'), ['plugin_value']);
assert.deepEqual(metadata.get('other_plugin_key'),

Loading…
Cancel
Save