File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -180,6 +180,18 @@ func TestDirectOutbound(t *testing.T) {
180
180
assert .NotNil (t , outbounds ["cadence-history" ].Unary )
181
181
}
182
182
183
+ func TestSingleGRPCOutbound (t * testing.T ) {
184
+ grpc := & grpc.Transport {}
185
+ tchannel := & tchannel.Transport {}
186
+
187
+ builder := NewSingleGRPCOutboundBuilder ("grpc-only-out" , "grpc-service-name" , "http://example.com:1234" )
188
+
189
+ outBound , err := builder .Build (grpc , tchannel )
190
+ assert .NoError (t , err )
191
+ assert .Equal (t , "grpc-service-name" , outBound .Outbounds ["grpc-only-out" ].ServiceName )
192
+ assert .NotNil (t , outBound .Outbounds ["grpc-only-out" ].Unary )
193
+ }
194
+
183
195
func TestIsGRPCOutboud (t * testing.T ) {
184
196
assert .True (t , IsGRPCOutbound (& transport.OutboundConfig {Outbounds : transport.Outbounds {Unary : (& grpc.Transport {}).NewSingleOutbound ("localhost:1234" )}}))
185
197
assert .False (t , IsGRPCOutbound (& transport.OutboundConfig {Outbounds : transport.Outbounds {Unary : (& tchannel.Transport {}).NewSingleOutbound ("localhost:1234" )}}))
Original file line number Diff line number Diff line change @@ -38,8 +38,9 @@ func TestNewParams(t *testing.T) {
38
38
dc := dynamicconfig .NewNopCollection ()
39
39
makeConfig := func (svc config.Service ) * config.Config {
40
40
return & config.Config {
41
- PublicClient : config.PublicClient {HostPort : "localhost:9999" },
42
- Services : map [string ]config.Service {"frontend" : svc }}
41
+ PublicClient : config.PublicClient {HostPort : "localhost:9999" },
42
+ ShardDistributorClient : config.ShardDistributorClient {HostPort : "localhost:9998" },
43
+ Services : map [string ]config.Service {"frontend" : svc }}
43
44
}
44
45
logger := testlogger .New (t )
45
46
metricsCl := metrics .NewNoopMetricsClient ()
You can’t perform that action at this time.
0 commit comments