Skip to content

Commit

Permalink
xds: replace verifyNoMoreInteractions with verifyNoInteractions (grpc…
Browse files Browse the repository at this point in the history
  • Loading branch information
voidzcy authored and dfawley committed Jan 15, 2021
1 parent 463fdb5 commit 410f4c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
10 changes: 4 additions & 6 deletions xds/src/test/java/io/grpc/xds/XdsClientImplTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoInteractions;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;

Expand Down Expand Up @@ -1864,8 +1865,7 @@ public void addRemoveClusterWatcherWhileInitialResourceFetchInProgress() {
assertThat(fakeClock.getPendingTasks(CDS_RESOURCE_FETCH_TIMEOUT_TASK_FILTER)).isEmpty();
assertThat(timeoutTask.isCancelled()).isTrue();

// TODO(chengyuanzhang): migrate to verifyNoInteractions.
verifyNoMoreInteractions(watcher3, watcher4);
verifyNoInteractions(watcher3, watcher4);
}

@Test
Expand Down Expand Up @@ -2132,8 +2132,7 @@ public void multipleEndpointWatchers() {
new LbEndpoint("192.168.0.1", 8080,
2, true)), 1, 0));

// TODO(chengyuanzhang): migrate to verifyNoInteractions.
verifyNoMoreInteractions(watcher3);
verifyNoInteractions(watcher3);

// Management server sends back another EDS response contains ClusterLoadAssignment for the
// other requested cluster.
Expand Down Expand Up @@ -2517,8 +2516,7 @@ public void addRemoveEndpointWatcherWhileInitialResourceFetchInProgress() {
assertThat(fakeClock.getPendingTasks(EDS_RESOURCE_FETCH_TIMEOUT_TASK_FILTER)).isEmpty();
assertThat(timeoutTask.isCancelled()).isTrue();

// TODO(chengyuanzhang): migrate to verifyNoInteractions.
verifyNoMoreInteractions(watcher3, watcher4);
verifyNoInteractions(watcher3, watcher4);
}

@Test
Expand Down
10 changes: 4 additions & 6 deletions xds/src/test/java/io/grpc/xds/XdsClientImplTestV2.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoInteractions;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;

Expand Down Expand Up @@ -1873,8 +1874,7 @@ public void addRemoveClusterWatcherWhileInitialResourceFetchInProgress() {
assertThat(fakeClock.getPendingTasks(CDS_RESOURCE_FETCH_TIMEOUT_TASK_FILTER)).isEmpty();
assertThat(timeoutTask.isCancelled()).isTrue();

// TODO(chengyuanzhang): migrate to verifyNoInteractions.
verifyNoMoreInteractions(watcher3, watcher4);
verifyNoInteractions(watcher3, watcher4);
}

@Test
Expand Down Expand Up @@ -2141,8 +2141,7 @@ public void multipleEndpointWatchers() {
new LbEndpoint("192.168.0.1", 8080,
2, true)), 1, 0));

// TODO(chengyuanzhang): migrate to verifyNoInteractions.
verifyNoMoreInteractions(watcher3);
verifyNoInteractions(watcher3);

// Management server sends back another EDS response contains ClusterLoadAssignment for the
// other requested cluster.
Expand Down Expand Up @@ -2526,8 +2525,7 @@ public void addRemoveEndpointWatcherWhileInitialResourceFetchInProgress() {
assertThat(fakeClock.getPendingTasks(EDS_RESOURCE_FETCH_TIMEOUT_TASK_FILTER)).isEmpty();
assertThat(timeoutTask.isCancelled()).isTrue();

// TODO(chengyuanzhang): migrate to verifyNoInteractions.
verifyNoMoreInteractions(watcher3, watcher4);
verifyNoInteractions(watcher3, watcher4);
}

@Test
Expand Down

0 comments on commit 410f4c9

Please sign in to comment.