Skip to content

Commit 2a9f8f4

Browse files
committed
address comments for testing
1 parent f0afe69 commit 2a9f8f4

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

packages/grpc-js/gulpfile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const runTests = checkTask(() => {
8383

8484
const testWithAlternativeResolver = checkTask(() => {
8585
process.env.GRPC_NODE_USE_ALTERNATIVE_RESOLVER = 'true';
86-
return gulp.src(`${outDir}/test/**/test-resolver.js`).pipe(
86+
return gulp.src(`${outDir}/test/test-resolver.js`).pipe(
8787
mocha({
8888
reporter: 'mocha-jenkins-reporter',
8989
require: ['ts-node/register'],

packages/grpc-js/test/test-resolver.ts

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import {
3131
subchannelAddressEqual,
3232
} from '../src/subchannel-address';
3333
import { parseUri, GrpcUri } from '../src/uri-parser';
34+
import { GRPC_NODE_USE_ALTERNATIVE_RESOLVER } from '../src/environment';
3435

3536
function hasMatchingAddress(
3637
endpointList: Endpoint[],
@@ -55,7 +56,10 @@ describe('Name Resolver', () => {
5556
describe('DNS Names', function () {
5657
// For some reason DNS queries sometimes take a long time on Windows
5758
this.timeout(4000);
58-
it('Should resolve localhost properly', done => {
59+
it('Should resolve localhost properly', function (done) {
60+
if (GRPC_NODE_USE_ALTERNATIVE_RESOLVER) {
61+
this.skip();
62+
}
5963
const target = resolverManager.mapUriDefaultScheme(
6064
parseUri('localhost:50051')!
6165
)!;
@@ -82,7 +86,10 @@ describe('Name Resolver', () => {
8286
const resolver = resolverManager.createResolver(target, listener, {});
8387
resolver.updateResolution();
8488
});
85-
it('Should default to port 443', done => {
89+
it('Should default to port 443', function (done) {
90+
if (GRPC_NODE_USE_ALTERNATIVE_RESOLVER) {
91+
this.skip();
92+
}
8693
const target = resolverManager.mapUriDefaultScheme(
8794
parseUri('localhost')!
8895
)!;
@@ -402,7 +409,10 @@ describe('Name Resolver', () => {
402409
const resolver2 = resolverManager.createResolver(target2, listener, {});
403410
resolver2.updateResolution();
404411
});
405-
it('should not keep repeating successful resolutions', done => {
412+
it('should not keep repeating successful resolutions', function (done) {
413+
if (GRPC_NODE_USE_ALTERNATIVE_RESOLVER) {
414+
this.skip();
415+
}
406416
const target = resolverManager.mapUriDefaultScheme(
407417
parseUri('localhost')!
408418
)!;
@@ -460,7 +470,7 @@ describe('Name Resolver', () => {
460470
}
461471
},
462472
},
463-
{ 'grpc.dns_min_time_between_resolutions_ms': 2000 }
473+
{}
464474
);
465475
resolver.updateResolution();
466476
setTimeout(() => {

0 commit comments

Comments
 (0)