mirror of https://github.com/grpc/grpc-node.git
Fix a couple of issues with tests on Windows
This commit is contained in:
parent
d5ce784348
commit
e41b99dffc
|
@ -79,7 +79,8 @@ describe('Client without a server', () => {
|
|||
after(() => {
|
||||
client.close();
|
||||
});
|
||||
it('should fail multiple calls to the nonexistent server', done => {
|
||||
it('should fail multiple calls to the nonexistent server', function(done) {
|
||||
this.timeout(5000);
|
||||
// Regression test for https://github.com/grpc/grpc-node/issues/1411
|
||||
client.makeUnaryRequest('/service/method', x => x, x => x, Buffer.from([]), (error, value) => {
|
||||
assert(error);
|
||||
|
|
|
@ -61,7 +61,9 @@ const serviceImpl = {
|
|||
describe(`${anyGrpc.clientName} client -> ${anyGrpc.serverName} server`, function() {
|
||||
it('client should not wait for ready by default', function(done) {
|
||||
this.timeout(15000);
|
||||
const disconnectedClient = new TestServiceClient('foo.test.google.com:50051', clientGrpc.credentials.createInsecure());
|
||||
/* TCP port 47 is reserved according to
|
||||
* https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers */
|
||||
const disconnectedClient = new TestServiceClient('localhost:47', clientGrpc.credentials.createInsecure());
|
||||
const deadline = new Date();
|
||||
deadline.setSeconds(deadline.getSeconds() + 10);
|
||||
disconnectedClient.unary({}, {deadline: deadline}, (error, value) =>{
|
||||
|
@ -72,7 +74,7 @@ describe(`${anyGrpc.clientName} client -> ${anyGrpc.serverName} server`, functio
|
|||
});
|
||||
it('client should wait for a connection with waitForReady on', function(done) {
|
||||
this.timeout(15000);
|
||||
const disconnectedClient = new TestServiceClient('foo.test.google.com:50051', clientGrpc.credentials.createInsecure());
|
||||
const disconnectedClient = new TestServiceClient('localhost:47', clientGrpc.credentials.createInsecure());
|
||||
const metadata = new clientGrpc.Metadata({waitForReady: true});
|
||||
const deadline = new Date();
|
||||
deadline.setSeconds(deadline.getSeconds() + 10);
|
||||
|
|
Loading…
Reference in New Issue