- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 1,754 for closeFn (0.11 sec)
-
okhttp/src/test/java/okhttp3/MultipartReaderTest.kt
) val part = parts.nextPart()!! parts.close() assertFailsWith<IllegalStateException> { part.body.request(10) }.also { expected -> assertThat(expected).hasMessage("closed") } } @Test fun `cannot call nextPart after calling close`() { val parts = MultipartReader( boundary = "simple boundary",
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 13.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/routes/debugsocket.go
// Run starts the server and waits for stopCh to be closed to close the server. func (s *DebugSocket) Run(stopCh <-chan struct{}) error { if err := os.Remove(s.path); err != nil && !os.IsNotExist(err) { return fmt.Errorf("failed to remove (%v): %v", s.path, err) } l, err := net.Listen("unix", s.path) if err != nil { return fmt.Errorf("listen error (%v): %v", s.path, err) } defer l.Close() srv := http.Server{Handler: s.mux}
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Dec 08 00:33:16 UTC 2022 - 2.2K bytes - Viewed (0) -
internal/http/check_port_others.go
l, err := lc.Listen(ctx, "tcp", net.JoinHostPort(host, port)) if err != nil { return err } // As we are able to listen on this network, the port is not in use. // Close the listener and continue check other networks. return l.Close()
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed May 03 21:12:25 UTC 2023 - 1.5K bytes - Viewed (0) -
platforms/core-execution/build-cache/src/main/java/org/gradle/caching/internal/controller/service/LoadTarget.java
Closer closer = Closer.create(); closer.register(input); try { if (loaded) { throw new IllegalStateException("Build cache entry has already been read"); } Files.asByteSink(file).writeFrom(input); loaded = true; } catch (Exception e) { throw closer.rethrow(e); } finally {
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 09:43:12 UTC 2023 - 1.8K bytes - Viewed (0) -
pkg/test/util.go
t.Cleanup(func() { vv.Store(old) }) } // NewStop returns a stop channel that will automatically be closed when the test is complete func NewStop(t Failer) chan struct{} { s := make(chan struct{}) t.Cleanup(func() { close(s) }) return s } // NewContext returns a context that will automatically be closed when the test is complete func NewContext(t Failer) context.Context {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Jan 05 01:20:59 UTC 2024 - 1.9K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/watch/watch.go
type Interface interface { // Stop tells the producer that the consumer is done watching, so the // producer should stop sending events and close the result channel. The // consumer should keep watching for events until the result channel is // closed. // // Because some implementations may create channels when constructed, Stop // must always be called, even if the consumer has not yet called // ResultChan().
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jun 12 20:06:22 UTC 2024 - 8.1K bytes - Viewed (1) -
src/net/http/clientserver_test.go
t.Fatal(err) } defer c.Close() fmt.Fprintln(c, "some bogus crap") })) closes := 0 res, err := cst.c.Post(cst.ts.URL, "text/plain", countCloseReader{&closes, strings.NewReader("hello")}) if err == nil { res.Body.Close() t.Fatal("expected an error to be returned from Post") } if closes != 1 { t.Errorf("closes = %d; want 1", closes) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 46.6K bytes - Viewed (0) -
pkg/test/framework/runtime.go
func (i *runtime) newRootContext(test *testImpl, goTest *testing.T, labels label.Set) *testContext { return newTestContext(test, goTest, i.context, nil, labels) } // Close implements io.Closer func (i *runtime) Close() error { return i.context.globalScope.done(i.context.settings.NoCleanup)
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu May 26 17:50:56 UTC 2022 - 1.9K bytes - Viewed (0) -
subprojects/core/src/test/groovy/org/gradle/internal/service/scopes/DefaultGradleUserHomeScopeServiceRegistryTest.groovy
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Mon May 27 12:34:44 UTC 2024 - 8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt
@Throws(IOException::class) override fun close() { closed.set(true) super.close() } }.buffer() } } body.charStream().close() assertThat(closed.get()).isTrue() } @Test fun readerClosedAfterBomClosesUnderlyingSource() { val closed = AtomicBoolean() val body: ResponseBody =
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Mon May 13 13:42:37 UTC 2024 - 13K bytes - Viewed (0)