Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for IdleConnStrsForTesting (0.22 sec)

  1. src/net/http/export_test.go

    	}
    	slices.Sort(keys)
    	return
    }
    
    func (t *Transport) IdleConnKeyCountForTesting() int {
    	t.idleMu.Lock()
    	defer t.idleMu.Unlock()
    	return len(t.idleConn)
    }
    
    func (t *Transport) IdleConnStrsForTesting() []string {
    	var ret []string
    	t.idleMu.Lock()
    	defer t.idleMu.Unlock()
    	for _, conns := range t.idleConn {
    		for _, pc := range conns {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 17 21:11:57 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  2. src/net/http/serve_test.go

    	if conns := tr.IdleConnStrsForTesting(); len(conns) != 1 {
    		t.Errorf("found %d idle conns (%q); want 1", len(conns), conns)
    	}
    
    	// SetKeepAlivesEnabled should discard idle conns.
    	ts.Config.SetKeepAlivesEnabled(false)
    
    	waitCondition(t, 10*time.Millisecond, func(d time.Duration) bool {
    		if conns := tr.IdleConnStrsForTesting(); len(conns) > 0 {
    			if d > 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 202K bytes
    - Viewed (0)
  3. src/net/http/transport_test.go

    		defer tr.CloseIdleConnections()
    		c := &Client{Transport: tr}
    
    		idleConns := func() []string {
    			if mode == http2Mode {
    				return tr.IdleConnStrsForTesting_h2()
    			} else {
    				return tr.IdleConnStrsForTesting()
    			}
    		}
    
    		var conn string
    		doReq := func(n int) (timeoutOk bool) {
    			req, _ := NewRequest("GET", cst.ts.URL, nil)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 192.6K bytes
    - Viewed (0)
Back to top