Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import static org.mockito.AdditionalAnswers.delegatesTo;
import static org.mockito.ArgumentMatchers.argThat;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.atLeast;
import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
Expand Down Expand Up @@ -1303,8 +1304,8 @@ public void metricWithRealChannel() throws Exception {
assertThat(recorder.getError()).isNull();

// Make sure at least one metric works. The other tests will make sure other metrics and the
// edge cases are working.
verify(metrics).addLongCounter(
// edge cases are working. Since this is racy, we just care it happened at least once.
verify(metrics, atLeast(1)).addLongCounter(
argThat((instr) -> instr.getName().equals("grpc.lb.wrr.rr_fallback")),
eq(1L),
eq(Arrays.asList("directaddress:///wrr-metrics")),
Expand Down
Loading