Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for TestHandler (0.17 sec)

  1. pkg/kube/multicluster/secretcontroller_test.go

    				return slices.Map(component.All(), func(e testHandler) result {
    					return result{e.ID, e.Iter}
    				})
    			}, step.want)
    		})
    	}
    }
    
    type testHandler struct {
    	ID     cluster.ID
    	Iter   int
    	Closed *atomic.Bool
    	Synced *atomic.Bool
    }
    
    func (h testHandler) Close() {
    	h.Closed.Store(true)
    }
    
    func (h testHandler) HasSynced() bool {
    	return h.Synced.Load()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 15:07:03 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  2. pkg/proxy/healthcheck/healthcheck_test.go

    		t.Errorf("expected 3 open ports, got %d\n%s", len(listener.openPorts), dump.Pretty(listener.openPorts))
    	}
    	// test the handlers
    	testHandler(hcs, nsn1, http.StatusServiceUnavailable, 0, t)
    	testHandler(hcs, nsn2, http.StatusServiceUnavailable, 0, t)
    	testHandler(hcs, nsn3, http.StatusServiceUnavailable, 0, t)
    
    	// sync endpoints
    	hcs.SyncEndpoints(map[types.NamespacedName]int{
    		nsn1: 9,
    		nsn2: 3,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 26 13:27:41 UTC 2024
    - 21.4K bytes
    - Viewed (0)
  3. src/testing/slogtest/slogtest.go

    		mod: func(r *slog.Record) { r.PC = 0 },
    		checks: []check{
    			missingKey(slog.SourceKey),
    		},
    	},
    }
    
    // TestHandler tests a [slog.Handler].
    // If TestHandler finds any misbehaviors, it returns an error for each,
    // combined into a single error with [errors.Join].
    //
    // TestHandler installs the given Handler in a [slog.Logger] and
    // makes several calls to the Logger's output methods.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 08 17:55:47 UTC 2023
    - 9.8K bytes
    - Viewed (0)
  4. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

          }
    
        Logger.getLogger("")
          .addHandler(testHandler)
        Logger.getLogger("okhttp3")
          .addHandler(testHandler)
        Logger.getLogger(Http2::class.java.name)
          .addHandler(testHandler)
        Logger.getLogger(TaskRunner::class.java.name)
          .addHandler(testHandler)
        Logger.getLogger(OkHttpClient::class.java.name)
          .addHandler(testHandler)
    
        server.enqueue(MockResponse(body = "abc"))
    
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 27K bytes
    - Viewed (0)
  5. internal/grid/grid_test.go

    		t.Log("client after", time.Since(clientEnd))
    	}
    	// local to remote, unbuffered
    	t.Run("unbuffered", func(t *testing.T) {
    		testHandler(t, handlerTest, false)
    	})
    	t.Run("buffered", func(t *testing.T) {
    		testHandler(t, handlerTest2, false)
    	})
    	t.Run("buffered", func(t *testing.T) {
    		testHandler(t, handlerTest2, true)
    	})
    }
    
    // testStreamDeadline will test if server
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 36.4K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/server/genericapiserver_test.go

    	}
    }
    
    func TestWarningWithRequestTimeout(t *testing.T) {
    	type result struct {
    		err        interface{}
    		stackTrace string
    	}
    	clientDoneCh, resultCh := make(chan struct{}), make(chan result, 1)
    	testHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
    		// this will catch recoverable panic like 'Header called after Handler finished'.
    		// go runtime crashes the program if it detects a program-ending
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 18:59:21 UTC 2024
    - 23.2K bytes
    - Viewed (0)
  7. src/expvar/expvar_test.go

    		t.Errorf(`f.Value() = %q, want %q`, v, x)
    	}
    
    	x = 17
    	if s, exp := f.String(), `17`; s != exp {
    		t.Errorf(`f.String() = %q, want %q`, s, exp)
    	}
    }
    
    func TestHandler(t *testing.T) {
    	RemoveAll()
    	m := NewMap("map1")
    	m.Add("a", 1)
    	m.Add("z", 2)
    	m2 := NewMap("map2")
    	for i := 0; i < 9; i++ {
    		m2.Add(strconv.Itoa(i), int64(i))
    	}
    	rr := httptest.NewRecorder()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:46:19 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/server/genericapiserver.go

    	// LoopbackClientConfig is a config for a privileged loopback connection to the API server
    	LoopbackClientConfig *restclient.Config
    
    	// minRequestTimeout is how short the request timeout can be.  This is used to build the RESTHandler
    	minRequestTimeout time.Duration
    
    	// ShutdownTimeout is the timeout used for server shutdown. This specifies the timeout before server
    	// gracefully shutdown returns.
    	ShutdownTimeout time.Duration
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 29 18:59:21 UTC 2024
    - 42.9K bytes
    - Viewed (0)
Back to top