Fixed the tests

pull/3099/head
murgatroid99 9 years ago
parent 1eb113c61e
commit e634f9afdf
  1. 8
      src/node/interop/interop_client.js
  2. 4
      src/node/interop/interop_server.js
  3. 2
      src/node/test/interop_sanity_test.js

@ -49,8 +49,8 @@ var AUTH_USER = ('155450119199-3psnrh1sdr3d8cpj1v46naggf81mhdnk' +
var COMPUTE_ENGINE_USER = ('155450119199-r5aaqa2vqoa9g5mv2m6s3m1l293rlmel' + var COMPUTE_ENGINE_USER = ('155450119199-r5aaqa2vqoa9g5mv2m6s3m1l293rlmel' +
'@developer.gserviceaccount.com'); '@developer.gserviceaccount.com');
var ECHO_INITIAL_KEY = "x-grpc-test-echo-initial"; var ECHO_INITIAL_KEY = 'x-grpc-test-echo-initial';
var ECHO_TRAILING_KEY = "x-grpc-test-echo-trailing-bin"; var ECHO_TRAILING_KEY = 'x-grpc-test-echo-trailing-bin';
/** /**
* Create a buffer filled with size zeroes * Create a buffer filled with size zeroes
@ -324,7 +324,7 @@ function customMetadata(client, done) {
unary.on('status', function(status) { unary.on('status', function(status) {
var echo_trailer = status.metadata.get(ECHO_TRAILING_KEY); var echo_trailer = status.metadata.get(ECHO_TRAILING_KEY);
assert(echo_trailer.length > 0); assert(echo_trailer.length > 0);
assert.strictEqual(echo_trailer.toString('hex'), 'ababab'); assert.strictEqual(echo_trailer[0].toString('hex'), 'ababab');
done(); done();
}); });
var stream = client.fullDuplexCall(metadata); var stream = client.fullDuplexCall(metadata);
@ -336,7 +336,7 @@ function customMetadata(client, done) {
stream.on('status', function(status) { stream.on('status', function(status) {
var echo_trailer = status.metadata.get(ECHO_TRAILING_KEY); var echo_trailer = status.metadata.get(ECHO_TRAILING_KEY);
assert(echo_trailer.length > 0); assert(echo_trailer.length > 0);
assert.strictEqual(echo_trailer.toString('hex'), 'ababab'); assert.strictEqual(echo_trailer[0].toString('hex'), 'ababab');
done(); done();
}); });
stream.write(streaming_arg); stream.write(streaming_arg);

@ -39,8 +39,8 @@ var _ = require('lodash');
var grpc = require('..'); var grpc = require('..');
var testProto = grpc.load(__dirname + '/test.proto').grpc.testing; var testProto = grpc.load(__dirname + '/test.proto').grpc.testing;
var ECHO_INITIAL_KEY = "x-grpc-test-echo-initial"; var ECHO_INITIAL_KEY = 'x-grpc-test-echo-initial';
var ECHO_TRAILING_KEY = "x-grpc-test-echo-trailing-bin"; var ECHO_TRAILING_KEY = 'x-grpc-test-echo-trailing-bin';
/** /**
* Create a buffer filled with size zeroes * Create a buffer filled with size zeroes

@ -90,7 +90,7 @@ describe('Interop tests', function() {
interop_client.runTest(port, name_override, 'timeout_on_sleeping_server', interop_client.runTest(port, name_override, 'timeout_on_sleeping_server',
true, true, done); true, true, done);
}); });
it.only('should pass custom_metadata', function(done) { it('should pass custom_metadata', function(done) {
interop_client.runTest(port, name_override, 'custom_metadata', interop_client.runTest(port, name_override, 'custom_metadata',
true, true, done); true, true, done);
}); });

Loading…
Cancel
Save