mirror of https://github.com/grpc/grpc-node.git
Fix subchannel address import, resolver test setup
This commit is contained in:
parent
1452ed93aa
commit
8605ef2ded
|
@ -20,7 +20,7 @@ import { ChannelOptions } from "./channel-options";
|
|||
import { LogVerbosity, Status } from "./constants";
|
||||
import { Metadata } from "./metadata";
|
||||
import { registerResolver, Resolver, ResolverListener } from "./resolver";
|
||||
import { SubchannelAddress } from "./subchannel";
|
||||
import { SubchannelAddress } from "./subchannel-address";
|
||||
import { GrpcUri, splitHostPort, uriToString } from "./uri-parser";
|
||||
import * as logging from './logging';
|
||||
|
||||
|
|
|
@ -19,21 +19,23 @@
|
|||
// tslint:disable no-any
|
||||
import * as assert from 'assert';
|
||||
import * as resolverManager from '../src/resolver';
|
||||
import * as load_balancer_pick_first from '../src/load-balancer-pick-first';
|
||||
import * as load_balancer_round_robin from '../src/load-balancer-round-robin';
|
||||
import * as resolver_dns from '../src/resolver-dns';
|
||||
import * as resolver_uds from '../src/resolver-uds';
|
||||
import * as resolver_ip from '../src/resolver-ip';
|
||||
import { ServiceConfig } from '../src/service-config';
|
||||
import { StatusObject } from '../src/call-stream';
|
||||
import { SubchannelAddress, isTcpSubchannelAddress } from "../src/subchannel-address";
|
||||
import { parseUri, GrpcUri } from '../src/uri-parser';
|
||||
|
||||
describe('Name Resolver', () => {
|
||||
before(() => {
|
||||
resolver_dns.setup();
|
||||
resolver_uds.setup();
|
||||
resolver_ip.setup();
|
||||
});
|
||||
describe('DNS Names', function() {
|
||||
// For some reason DNS queries sometimes take a long time on Windows
|
||||
this.timeout(4000);
|
||||
before(() => {
|
||||
load_balancer_pick_first.setup();
|
||||
load_balancer_round_robin.setup();
|
||||
});
|
||||
it('Should resolve localhost properly', done => {
|
||||
const target = resolverManager.mapUriDefaultScheme(parseUri('localhost:50051')!)!;
|
||||
const listener: resolverManager.ResolverListener = {
|
||||
|
|
Loading…
Reference in New Issue