- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 16 for isSimulated (0.06 seconds)
-
src/test/java/jcifs/smb/SmbResourceLocatorInternalTest.java
void overlapsThrowsCifsException() throws Exception { when(locator.overlaps(any())).thenThrow(new CIFSException("Simulated failure")); CIFSException ex = assertThrows(CIFSException.class, () -> locator.overlaps(other)); assertTrue(ex.getMessage().contains("Simulated failure")); verify(locator).overlaps(other); verifyNoMoreInteractions(locator); }
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 6.9K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/job/AggregateLogJobTest.java
SearchLogHelper mockSearchLogHelper = new SearchLogHelper() { @Override public void storeSearchLog() { throw new OutOfMemoryError("Simulated OOM"); } }; ComponentUtil.register(mockSearchLogHelper, "searchLogHelper"); // Execute the job - Error should NOT be caught since implementation only catches Exception
Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Wed Jan 14 14:29:07 GMT 2026 - 12.3K bytes - Click Count (0) -
tests/test_dependency_after_yield_raise.py
yield "s" raise ValueError("Broken after yield") app = FastAPI() @app.get("/catching") def catching(d: Annotated[str, Depends(catching_dep)]) -> Any: raise CustomError("Simulated error during streaming") @app.get("/broken") def broken(d: Annotated[str, Depends(broken_dep)]) -> Any: return {"message": "all good?"} client = TestClient(app) def test_catching():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 1.7K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/suggest/SuggesterResourceLoadingTest.java
if (is.available() > 0) { throw new RuntimeException("Simulated processing error"); } } fail("Should have thrown RuntimeException"); } catch (RuntimeException e) { assertEquals("Simulated processing error", e.getMessage()); // If InputStream wasn't properly closed, this would leak resources
Created: Fri Apr 17 09:08:13 GMT 2026 - Last Modified: Mon Nov 24 03:40:05 GMT 2025 - 9.6K bytes - Click Count (0) -
guava-tests/test/com/google/common/collect/ConcurrentHashMultisetTest.java
AtomicInteger existingZero = new AtomicInteger(0); // initial map.get() when(backingMap.get(KEY)).thenReturn(null); // since get returned null, try a putIfAbsent; that fails due to a simulated race when(backingMap.putIfAbsent(eq(KEY), isA(AtomicInteger.class))).thenReturn(existingZero); // since the putIfAbsent returned a zero, we'll try to replace...
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 12 17:47:10 GMT 2026 - 16.3K bytes - Click Count (0) -
src/test/java/jcifs/tests/persistent/HandleReconnectorTest.java
protected boolean performReconnection(HandleInfo info) throws Exception { if (shouldSucceed) { return true; } else { throw new IOException("Simulated reconnection failure"); } } public void testCreateReconnectionRequest(HandleInfo handle) { createReconnectionRequest(handle); } }
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 21 04:51:33 GMT 2025 - 5.6K bytes - Click Count (0) -
src/test/java/jcifs/util/SmbCircuitBreakerTest.java
String result = circuitBreaker.executeWithCircuitBreaker(() -> { if ((threadId + iteration) % 10 == 0) { throw new RuntimeException("Simulated failure"); } return "success"; }); successCount.incrementAndGet();
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 30 05:58:03 GMT 2025 - 23.2K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/mylasta/direction/sponsor/FessCurtainFinallyHookTest.java
} // Mock class for testing exception scenarios private static class MockMultiThreadedHttpConnectionManager { public static void shutdownAll() { throw new RuntimeException("Simulated exception during shutdown"); } } // Test to verify the logger field is properly initialized @Test public void test_loggerFieldInitialization() throws Exception {Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Fri Mar 13 23:01:26 GMT 2026 - 8.7K bytes - Click Count (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt
}, logger = logger, ) /** Runs all tasks that are ready. Used by the test thread only. */ fun runTasks() { advanceUntil(nanoTime) } /** Advance the simulated clock, then runs tasks that are ready. Used by the test thread only. */ fun advanceUntil(newTime: Long) { taskRunner.assertLockNotHeld() taskRunner.withLock { check(currentTask == TestThreadSerialTask)Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed May 28 23:28:25 GMT 2025 - 11.9K bytes - Click Count (0) -
src/test/java/org/codelibs/curl/io/IOIntegrationTest.java
// ## Arrange ## CurlRequest req = new OpenOverrideCurlRequest(Curl.Method.GET, "http://dummy", u -> { throw new IOException("Simulated connection failure"); }); // ## Act & Assert ## try { req.execute(); fail("Should throw CurlException"); } catch (CurlException e) {Created: Thu Apr 02 15:34:12 GMT 2026 - Last Modified: Sat Mar 21 12:00:34 GMT 2026 - 44.1K bytes - Click Count (0)