Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
Signed-off-by: Taylor Gray <tylgry@amazon.com>
  • Loading branch information
graytaylor0 committed Aug 20, 2024
1 parent 52aef81 commit c407ece
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.mockito.Mockito.lenient;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verifyNoInteractions;
import static org.junit.jupiter.api.Assertions.assertThrows;
Expand All @@ -44,7 +45,7 @@ public void setup() {
when(pluginMetrics.counter("recordsIn")).thenReturn(mock(Counter.class));
when(pluginMetrics.counter("recordsOut")).thenReturn(mock(Counter.class));
when(pluginMetrics.counter("processingFailures")).thenReturn(this.processingFailuresCounter);
when(pluginMetrics.counter("parseErrors")).thenReturn(this.parseErrorsCounter);
lenient().when(pluginMetrics.counter("parseErrors")).thenReturn(this.parseErrorsCounter);
when(processorConfig.getHandleFailedEventsOption()).thenReturn(handleFailedEventsOption);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.Mockito.lenient;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoInteractions;
Expand Down Expand Up @@ -84,7 +85,7 @@ public void setup() {
when(pluginMetrics.counter("recordsIn")).thenReturn(mock(Counter.class));
when(pluginMetrics.counter("recordsOut")).thenReturn(mock(Counter.class));
when(pluginMetrics.counter("processingFailures")).thenReturn(processingFailuresCounter);
when(pluginMetrics.counter("parseErrors")).thenReturn(parseErrorsCounter);
lenient().when(pluginMetrics.counter("parseErrors")).thenReturn(parseErrorsCounter);
when(processorConfig.getHandleFailedEventsOption()).thenReturn(handleFailedEventsOption);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import static org.hamcrest.MatcherAssert.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.lenient;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoInteractions;
Expand Down Expand Up @@ -74,7 +75,7 @@ public void setup() {
when(pluginMetrics.counter("recordsIn")).thenReturn(mock(Counter.class));
when(pluginMetrics.counter("recordsOut")).thenReturn(mock(Counter.class));
when(pluginMetrics.counter("processingFailures")).thenReturn(processingFailuresCounter);
when(pluginMetrics.counter("parseErrors")).thenReturn(parseErrorsCounter);
lenient().when(pluginMetrics.counter("parseErrors")).thenReturn(parseErrorsCounter);
when(processorConfig.getHandleFailedEventsOption()).thenReturn(handleFailedEventsOption);
}

Expand Down

0 comments on commit c407ece

Please sign in to comment.