Skip to content

Commit f0afe69

Browse files
committed
add tests for test-resolver with alternative resolver
1 parent 717725c commit f0afe69

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

packages/grpc-js/gulpfile.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,21 @@ const runTests = checkTask(() => {
8181
);
8282
});
8383

84-
const test = gulp.series(install, copyTestFixtures, runTests);
84+
const testWithAlternativeResolver = checkTask(() => {
85+
process.env.GRPC_NODE_USE_ALTERNATIVE_RESOLVER = 'true';
86+
return gulp.src(`${outDir}/test/**/test-resolver.js`).pipe(
87+
mocha({
88+
reporter: 'mocha-jenkins-reporter',
89+
require: ['ts-node/register'],
90+
})
91+
);
92+
});
93+
94+
const test = gulp.series(
95+
install,
96+
copyTestFixtures,
97+
runTests,
98+
testWithAlternativeResolver
99+
);
85100

86101
export { install, lint, clean, cleanAll, compile, test };

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ describe('Name Resolver', () => {
460460
}
461461
},
462462
},
463-
{}
463+
{ 'grpc.dns_min_time_between_resolutions_ms': 2000 }
464464
);
465465
resolver.updateResolution();
466466
setTimeout(() => {

0 commit comments

Comments
 (0)