File tree 2 files changed +5
-3
lines changed
main/java/io/grpc/internal
test/java/io/grpc/internal
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1252,7 +1252,8 @@ private class NameResolverListenerImpl implements NameResolver.Listener {
1252
1252
@ Override
1253
1253
public void onAddresses (final List <EquivalentAddressGroup > servers , final Attributes config ) {
1254
1254
if (servers .isEmpty ()) {
1255
- onError (Status .UNAVAILABLE .withDescription ("NameResolver returned an empty list" ));
1255
+ onError (Status .UNAVAILABLE .withDescription (
1256
+ "Name resolver " + helper .nr + " returned an empty list" ));
1256
1257
return ;
1257
1258
}
1258
1259
if (logger .isLoggable (Level .FINE )) {
Original file line number Diff line number Diff line change 51
51
import com .google .common .collect .ImmutableList ;
52
52
import com .google .common .collect .ImmutableMap ;
53
53
import com .google .common .collect .Iterables ;
54
+ import com .google .common .truth .Truth ;
54
55
import com .google .common .util .concurrent .ListenableFuture ;
55
56
import com .google .common .util .concurrent .MoreExecutors ;
56
57
import com .google .common .util .concurrent .SettableFuture ;
@@ -759,7 +760,7 @@ public void nameResolutionFailed_delayedTransportShutdownCancelsBackoff() {
759
760
760
761
@ Test
761
762
public void nameResolverReturnsEmptySubLists () {
762
- String errorDescription = "NameResolver returned an empty list" ;
763
+ String errorDescription = "returned an empty list" ;
763
764
764
765
// Pass a FakeNameResolverFactory with an empty list
765
766
createChannel ();
@@ -769,7 +770,7 @@ public void nameResolverReturnsEmptySubLists() {
769
770
verify (mockLoadBalancer ).handleNameResolutionError (statusCaptor .capture ());
770
771
Status status = statusCaptor .getValue ();
771
772
assertSame (Status .Code .UNAVAILABLE , status .getCode ());
772
- assertEquals ( errorDescription , status .getDescription ());
773
+ Truth . assertThat ( status .getDescription ()). contains ( errorDescription );
773
774
}
774
775
775
776
@ Test
You can’t perform that action at this time.
0 commit comments