Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for thenAnswer (1.98 sec)

  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);
                }
    Registered: Sat Dec 20 11:21:39 UTC 2025
    - Last Modified: Thu Nov 20 08:44:44 UTC 2025
    - 17K bytes
    - Viewed (0)
Back to top