xds: fix the EDS dups test so it doesn't assume address order (#9786)
diff --git a/xds/src/test/java/io/grpc/xds/RingHashLoadBalancerTest.java b/xds/src/test/java/io/grpc/xds/RingHashLoadBalancerTest.java
index 64651eb..ed2fff0 100644
--- a/xds/src/test/java/io/grpc/xds/RingHashLoadBalancerTest.java
+++ b/xds/src/test/java/io/grpc/xds/RingHashLoadBalancerTest.java
@@ -1096,10 +1096,11 @@
assertThat(result.getStatus().isOk()).isFalse(); // fail the RPC
assertThat(result.getStatus().getCode())
.isEqualTo(Code.UNAVAILABLE); // with error status for the original server hit by hash
- assertThat(result.getStatus().getDescription()).isEqualTo(
- "Ring hash lb error: EDS resolution was successful, but there were duplicate "
- + "addresses: Address: FakeSocketAddress-server1, count: 2; "
- + "Address: FakeSocketAddress-server2, count: 3");
+ String description = result.getStatus().getDescription();
+ assertThat(description).startsWith(
+ "Ring hash lb error: EDS resolution was successful, but there were duplicate addresses: ");
+ assertThat(description).contains("Address: FakeSocketAddress-server1, count: 2");
+ assertThat(description).contains("Address: FakeSocketAddress-server2, count: 3");
}
private void deliverSubchannelState(Subchannel subchannel, ConnectivityStateInfo state) {