Skip to content

Commit

Permalink
Run due tasks for scheduled 0-delay retries.
Browse files Browse the repository at this point in the history
  • Loading branch information
voidzcy committed Nov 20, 2019
1 parent 4e90bd1 commit 1264ef7
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions xds/src/test/java/io/grpc/xds/XdsClientImplTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -2311,6 +2311,7 @@ public void streamClosedAndRetry() {

// Resets backoff and retry immediately.
inOrder.verify(backoffPolicyProvider).get();
fakeClock.runDueTasks();
inOrder.verify(mockedDiscoveryService)
.streamAggregatedResources(responseObserverCaptor.capture());
responseObserver = responseObserverCaptor.getValue();
Expand Down Expand Up @@ -2387,6 +2388,7 @@ public void streamClosedAndRetry() {

// Resets backoff and retry immediately
inOrder.verify(backoffPolicyProvider).get();
fakeClock.runDueTasks();
inOrder.verify(mockedDiscoveryService)
.streamAggregatedResources(responseObserverCaptor.capture());
responseObserver = responseObserverCaptor.getValue();
Expand Down Expand Up @@ -2453,6 +2455,7 @@ public void streamClosedAndRetryRaceWithAddingAndRemovingWatchers() {

// Resets backoff and retry immediately.
inOrder.verify(backoffPolicyProvider).get();
fakeClock.runDueTasks();
inOrder.verify(mockedDiscoveryService)
.streamAggregatedResources(responseObserverCaptor.capture());
responseObserver = responseObserverCaptor.getValue();
Expand Down Expand Up @@ -2527,6 +2530,7 @@ public void streamClosedAndRetryRaceWithAddingAndRemovingWatchers() {

// Resets backoff and retry immediately.
inOrder.verify(backoffPolicyProvider).get();
fakeClock.runDueTasks();
inOrder.verify(mockedDiscoveryService)
.streamAggregatedResources(responseObserverCaptor.capture());
responseObserver = responseObserverCaptor.getValue();
Expand Down Expand Up @@ -2788,17 +2792,12 @@ private static io.envoyproxy.envoy.api.v2.endpoint.LbEndpoint buildLbEndpoint(St
}

/**
<<<<<<< HEAD
* Matcher for DiscoveryRequest without the comparison of error_details field, which is used for
* management server debugging purposes.
*
* <p>In general, if you are sure error_details field should not be set in a DiscoveryRequest,
* compare with message equality. Otherwise, this matcher is handy for comparing other fields
* only.
=======
* Matcher for DiscoveryRequest used to verify NACK requests. Eliminates the comparison of
* error_details for DiscoveryRequests if they are expected to be an NACK request.
>>>>>>> Add tests for EDS protocol and endpoint watchers.
*/
private static class DiscoveryRequestMatcher implements ArgumentMatcher<DiscoveryRequest> {
private final String versionInfo;
Expand Down

0 comments on commit 1264ef7

Please sign in to comment.