Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for IsIdleForTesting (0.22 sec)

  1. src/net/http/export_test.go

    		}
    	}
    	return 0
    }
    
    func (t *Transport) IdleConnWaitMapSizeForTesting() int {
    	t.idleMu.Lock()
    	defer t.idleMu.Unlock()
    	return len(t.idleConnWait)
    }
    
    func (t *Transport) IsIdleForTesting() bool {
    	t.idleMu.Lock()
    	defer t.idleMu.Unlock()
    	return t.closeIdle
    }
    
    func (t *Transport) QueueForIdleConnForTesting() {
    	t.queueForIdleConn(nil)
    }
    
    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/transport_test.go

    	tr.CloseIdleConnections()
    	if !tr.IsIdleForTesting() {
    		t.Error("should be idle after CloseIdleConnections")
    	}
    	wantIdle("after close idle", 0)
    	if tr.PutIdleTestConn("http", "example.com") {
    		t.Fatal("put didn't fail")
    	}
    	wantIdle("after second put", 0)
    
    	tr.QueueForIdleConnForTesting() // should toggle the transport out of idle mode
    	if tr.IsIdleForTesting() {
    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