Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for thenAnswer (0.13 seconds)

  1. fess-crawler-opensearch/src/test/java/org/codelibs/fess/crawler/client/FesenClientTest.java

            final ActionFuture<String> mockFuture = mock(ActionFuture.class);
    
            // Fail 5 times, succeed on 6th attempt
            when(mockFuture.actionGet(anyLong(), any(TimeUnit.class))).thenAnswer(invocation -> {
                int count = attemptCount.incrementAndGet();
                if (count <= 5) {
                    throw new RuntimeException("Simulated failure #" + count);
                }
    Created: Sun Apr 12 03:50:13 GMT 2026
    - Last Modified: Mon Jan 12 06:25:38 GMT 2026
    - 16.9K bytes
    - Click Count (0)
Back to Top