xds: fix bug of verifying xDS requests with ordered resource names

Use matcher that takes care of resource name ordering for comparing requests.
This commit is contained in:
Chengyuan Zhang 2019-12-09 16:39:26 -08:00 committed by GitHub
parent e66ab4e63b
commit 942c1c6b5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -1474,7 +1474,8 @@ public class XdsClientImplTest {
// Client sent a new CDS request for all interested resources. // Client sent a new CDS request for all interested resources.
verify(requestObserver) verify(requestObserver)
.onNext( .onNext(
eq(buildDiscoveryRequest(NODE, "0", argThat(
new DiscoveryRequestMatcher("0",
ImmutableList.of("cluster-foo.googleapis.com", "cluster-bar.googleapis.com"), ImmutableList.of("cluster-foo.googleapis.com", "cluster-bar.googleapis.com"),
XdsClientImpl.ADS_TYPE_URL_CDS, "0000"))); XdsClientImpl.ADS_TYPE_URL_CDS, "0000")));