- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 134 for shutDown (0.06 seconds)
-
docs/en/docs/advanced/events.md
### `shutdown` event { #shutdown-event } To add a function that should be run when the application is shutting down, declare it with the event `"shutdown"`: {* ../../docs_src/events/tutorial002_py310.py hl[6] *} Here, the `shutdown` event handler function will write a text line `"Application shutdown"` to a file `log.txt`. /// infoCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 7.8K bytes - Click Count (0) -
docs/zh-hant/docs/advanced/testing-events.md
# 測試事件:lifespan 與 startup - shutdown { #testing-events-lifespan-and-startup-shutdown } 當你需要在測試中執行 lifespan(生命週期)時,你可以使用 TestClient 並搭配 with 陳述式: {* ../../docs_src/app_testing/tutorial004_py310.py hl[9:15,18,27:28,30:32,41:43] *} 你可以閱讀更多細節:[在測試中執行 lifespan](https://www.starlette.dev/lifespan/#running-lifespan-in-tests)(Starlette 官方文件)。 對於已棄用的 `startup` 和 `shutdown` 事件,你可以這樣使用 TestClient:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 08:15:26 GMT 2026 - 618 bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/WebSocket.kt
* message buffer (16 MiB) will be rejected and trigger a [graceful shutdown][close] of this web * socket. This method returns false in that case, and in any other case where this web socket is * closing, closed, or canceled. * * This method returns immediately. */ fun send(bytes: ByteString): Boolean /** * Attempts to initiate a graceful shutdown of this web socket. Any already-enqueued messages will
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Mar 10 21:45:14 GMT 2026 - 6.1K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/job/JobExecutorTest.java
assertEquals(listener, jobExecutor.shutdownListener); // Verify listener is called on shutdown jobExecutor.shutdown(); assertTrue(shutdownCalled.get()); } @Test public void test_addShutdownListener_replace() { // Test replacing shutdown listener AtomicInteger callCount = new AtomicInteger(0); ShutdownListener listener1 = new ShutdownListener() {
Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Wed Jan 14 14:29:07 GMT 2026 - 9.4K bytes - Click Count (0) -
docs/ja/docs/advanced/testing-events.md
# イベントのテスト: lifespan と startup - shutdown { #testing-events-lifespan-and-startup-shutdown } テストで `lifespan` を実行する必要がある場合は、`with` 文と併用して `TestClient` を使用できます: {* ../../docs_src/app_testing/tutorial004_py310.py hl[9:15,18,27:28,30:32,41:43] *} より詳しい内容は、[公式 Starlette ドキュメントの「テストでの lifespan の実行」](https://www.starlette.dev/lifespan/#running-lifespan-in-tests) を参照してください。 非推奨の `startup` および `shutdown` イベントについては、次のように `TestClient` を使用できます:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 13 15:24:30 GMT 2026 - 724 bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java
ExecutorService service = mock(ExecutorService.class); application.addDelayedShutdownHook(service, 2, SECONDS); verify(service, never()).shutdown(); application.shutdown(); InOrder shutdownFirst = inOrder(service); shutdownFirst.verify(service).shutdown(); shutdownFirst.verify(service).awaitTermination(2, SECONDS); }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 26.1K bytes - Click Count (0) -
android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java
} }); this.shutdown = shutdown; start(); } @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait. void shutdown() { shutdown.set(true); while (this.isAlive()) { Thread.yield(); } } } void assertWrapsInterruptedException(RuntimeException e) {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 17 16:11:48 GMT 2026 - 8.8K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/job/impl/ScriptExecutorTest.java
@Test public void test_shutdown_withListener() { // Add shutdown listener TestShutdownListener listener = new TestShutdownListener(); scriptExecutor.addShutdownListener(listener); // Verify listener not called yet assertFalse(listener.wasShutdownCalled()); // Call shutdown scriptExecutor.shutdown(); // Verify listener was calledCreated: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Wed Jan 14 14:29:07 GMT 2026 - 10.5K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/AbstractIdleServiceTest.java
public void testStop_failed() { Exception exception = new Exception("deliberate"); TestService service = new TestService() { @Override protected void shutDown() throws Exception { super.shutDown(); throw exception; } }; service.startAsync().awaitRunning(); assertEquals(1, service.startUpCalled); assertEquals(0, service.shutDownCalled);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 12 17:47:10 GMT 2026 - 7.7K bytes - Click Count (0) -
docs/en/docs/advanced/testing-events.md
# Testing Events: lifespan and startup - shutdown { #testing-events-lifespan-and-startup-shutdown } When you need `lifespan` to run in your tests, you can use the `TestClient` with a `with` statement: {* ../../docs_src/app_testing/tutorial004_py310.py hl[9:15,18,27:28,30:32,41:43] *} You can read more details about the ["Running lifespan in tests in the official Starlette documentation site."](https://www.starlette.dev/lifespan/#running-lifespan-in-tests)Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 628 bytes - Click Count (0)