Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for newConnections (0.22 sec)

  1. okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt

        assertThat(c1.socket().isClosed).isFalse()
      }
    
      @Test fun cleanupPrioritizesEarliestEviction() {
        val pool = factory.newConnectionPool()
        val c1 = factory.newConnection(pool, routeA1, 75L)
        val c2 = factory.newConnection(pool, routeB1, 50L)
    
        // Running at time 75, the pool returns that nothing can be evicted until time 150.
        assertThat(pool.closeConnections(75L)).isEqualTo(75L)
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Wed Apr 24 04:40:49 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  2. pilot/pkg/xds/pushqueue_test.go

    		}
    	case <-time.After(time.Millisecond * 500):
    		t.Fatalf("Timed out")
    	}
    }
    
    func TestProxyQueue(t *testing.T) {
    	proxies := make([]*Connection, 0, 100)
    	for p := 0; p < 100; p++ {
    		conn := newConnection("", nil)
    		conn.SetID(fmt.Sprintf("proxy-%d", p))
    		proxies = append(proxies, conn)
    	}
    
    	t.Run("simple add and remove", func(t *testing.T) {
    		t.Parallel()
    		p := NewPushQueue()
    		defer p.ShutDown()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 30 00:26:45 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/FakeRoutePlanner.kt

      inner class FakePlan(
        val id: Int,
      ) : RoutePlanner.Plan {
        var planningThrowable: Throwable? = null
        var canceled = false
        var connectState = ConnectState.READY
        val connection =
          factory.newConnection(
            pool = pool,
            route = factory.newRoute(address),
            idleAtNanos = defaultConnectionIdleAtNanos,
          )
        var retry: FakePlan? = null
        var retryTaken = false
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Wed Apr 24 04:40:49 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/TestValueFactory.kt

      var hostnameVerifier: HostnameVerifier? = HttpsURLConnection.getDefaultHostnameVerifier()
      var uriHost: String = "example.com"
      var uriPort: Int = 1
    
      fun newConnection(
        pool: RealConnectionPool,
        route: Route,
        idleAtNanos: Long = Long.MAX_VALUE,
        taskRunner: TaskRunner = this.taskRunner,
      ): RealConnection {
        val result =
          RealConnection.newTestConnection(
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  5. pilot/pkg/xds/ads.go

    	pushRequest *model.PushRequest
    
    	// function to call once a push is finished. This must be called or future changes may be blocked.
    	done func()
    }
    
    func newConnection(peerAddr string, stream DiscoveryStream) *Connection {
    	return &Connection{
    		Connection: xds.NewConnection(peerAddr, stream),
    	}
    }
    
    func (conn *Connection) Initialize(node *core.Node) error {
    	return conn.s.initConnection(node, conn, conn.ids)
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Jun 03 08:29:05 UTC 2024
    - 23.4K bytes
    - Viewed (0)
  6. pilot/pkg/xds/discovery_test.go

    	"istio.io/istio/pkg/test/util/retry"
    	"istio.io/istio/pkg/util/sets"
    )
    
    func createProxies(n int) []*Connection {
    	proxies := make([]*Connection, 0, n)
    	for p := 0; p < n; p++ {
    		conn := newConnection("", &fakeStream{})
    		conn.SetID(fmt.Sprintf("proxy-%v", p))
    		proxies = append(proxies, conn)
    	}
    	return proxies
    }
    
    func wgDoneOrTimeout(wg *sync.WaitGroup, timeout time.Duration) bool {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 30 00:26:45 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  7. security/pkg/nodeagent/sds/sdsservice.go

    // StreamSecrets serves SDS discovery requests and SDS push requests
    func (s *sdsservice) StreamSecrets(stream sds.SecretDiscoveryService_StreamSecretsServer) error {
    	return xds.Stream(&Context{
    		BaseConnection: xds.NewConnection("", stream),
    		s:              s,
    		w:              &Watch{},
    	})
    }
    
    func (s *sdsservice) DeltaSecrets(stream sds.SecretDiscoveryService_DeltaSecretsServer) error {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat May 25 00:20:04 UTC 2024
    - 10.9K bytes
    - Viewed (0)
  8. pkg/kubelet/server/server_test.go

    	}
    	defer resp.Body.Close()
    
    	upgradeRoundTripper.Dialer = &net.Dialer{
    		Deadline: time.Now().Add(60 * time.Second),
    		Timeout:  60 * time.Second,
    	}
    	conn, err := upgradeRoundTripper.NewConnection(resp)
    	if err != nil {
    		t.Fatalf("Unexpected error creating streaming connection: %s", err)
    	}
    	if conn == nil {
    		t.Fatal("Unexpected nil connection")
    	}
    
    	<-conn.CloseChan()
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 51.5K bytes
    - Viewed (0)
  9. internal/grid/manager.go

    		if host == o.Local {
    			if found {
    				return nil, fmt.Errorf("grid: local host found multiple times")
    			}
    			found = true
    			// No connection to local.
    			continue
    		}
    		m.targets[host] = newConnection(connectionParams{
    			ctx:           ctx,
    			id:            m.ID,
    			local:         o.Local,
    			remote:        host,
    			dial:          o.Dialer,
    			handlers:      &m.handlers,
    			auth:          o.AddAuth,
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 17:40:33 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  10. pkg/xds/server.go

    	reqChan chan *discovery.DiscoveryRequest
    
    	// errorChan is used to process error during discovery request processing.
    	errorChan chan error
    }
    
    func NewConnection(peerAddr string, stream DiscoveryStream) Connection {
    	return Connection{
    		pushChannel: make(chan any),
    		initialized: make(chan struct{}),
    		stop:        make(chan struct{}),
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon May 13 20:55:20 UTC 2024
    - 16.3K bytes
    - Viewed (0)
Back to top