Skip to content

Commit

Permalink
SOLR-17618: Add assumeWorkingMockito
Browse files Browse the repository at this point in the history
  • Loading branch information
sandbergja committed Jan 12, 2025
1 parent 387b944 commit 51f7b0c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions solr/core/src/test/org/apache/solr/util/TimeOutTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,17 @@
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

import org.apache.solr.SolrTestCase;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.common.util.TimeSource;
import org.junit.BeforeClass;

public class TimeOutTest extends SolrTestCaseJ4 {

@BeforeClass
public static void setUpOnce() {
assumeWorkingMockito();
}

public class TimeOutTest extends SolrTestCase {
public void testHasTimedOut() {
TimeSource mockTimeSource = mock(TimeSource.class);
when(mockTimeSource.getTimeNs()).thenReturn(Long.valueOf(10)).thenReturn(Long.valueOf(50));
Expand Down

0 comments on commit 51f7b0c

Please sign in to comment.