Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 34 for newClient (0.05 seconds)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

    import org.junit.jupiter.api.extension.ExtensionContext
    
    /**
     * Apply this rule to all tests. It adds additional checks for leaked resources and uncaught
     * exceptions.
     *
     * Use [newClient] as a factory for a OkHttpClient instances. These instances are specifically
     * configured for testing.
     */
    class OkHttpClientTestRule :
      BeforeEachCallback,
      AfterEachCallback {
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Nov 04 19:13:52 GMT 2025
    - 10.8K bytes
    - Click Count (0)
  2. internal/dsync/dsync-client_test.go

    type ReconnectRESTClient struct {
    	u    *url.URL
    	rest *rest.Client
    }
    
    // newClient constructs a ReconnectRESTClient object with addr and endpoint initialized.
    // It _doesn't_ connect to the remote endpoint. See Call method to see when the
    // connect happens.
    func newClient(endpoint string) NetLocker {
    	u, err := url.Parse(endpoint)
    	if err != nil {
    		panic(err)
    	}
    
    	tr := &http.Transport{
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Thu Jan 20 17:36:09 GMT 2022
    - 4.4K bytes
    - Click Count (0)
  3. cmd/warm-backend-azure.go

    		return errors.New("no authentication mechanism was provided")
    	}
    
    	if conf.Bucket == "" {
    		return errors.New("no bucket name was provided")
    	}
    
    	return nil
    }
    
    func (conf azureConf) NewClient() (clnt *azblob.Client, clntErr error) {
    	if err := conf.Validate(); err != nil {
    		return nil, err
    	}
    
    	ep := conf.Endpoint
    	if ep == "" {
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Thu Oct 31 22:10:24 GMT 2024
    - 7K bytes
    - Click Count (0)
  4. internal/rest/client.go

    }
    
    // Close closes all idle connections of the underlying http client
    func (c *Client) Close() {
    	atomic.StoreInt32(&c.connected, closed)
    }
    
    // NewClient - returns new REST client.
    func NewClient(uu *url.URL, tr http.RoundTripper, auth func() string) *Client {
    	connected := int32(online)
    	urlStr := uu.String()
    	u, err := url.Parse(urlStr)
    	if err != nil {
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Sun Sep 28 20:59:21 GMT 2025
    - 14.7K bytes
    - Click Count (0)
  5. internal/dsync/dsync_test.go

    // TestMain initializes the testing framework
    func TestMain(m *testing.M) {
    	startLockServers()
    
    	// Initialize locker clients for dsync.
    	var clnts []NetLocker
    	for i := range nodes {
    		clnts = append(clnts, newClient(nodes[i].URL))
    	}
    
    	ds = &Dsync{
    		GetLockers: func() ([]NetLocker, string) { return clnts, uuid.New().String() },
    		Timeouts: Timeouts{
    			Acquire:         testDrwMutexAcquireTimeout,
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 10.8K bytes
    - Click Count (0)
  6. internal/event/target/elasticsearch.go

    	}
    	// Set basic auth
    	if args.Username != "" && args.Password != "" {
    		elasticConfig.Username = args.Username
    		elasticConfig.Password = args.Password
    	}
    	// Create a client
    	client, err := elasticsearch7.NewClient(elasticConfig)
    	if err != nil {
    		return nil, err
    	}
    	clientV7 := &esClientV7{client}
    	return clientV7, nil
    }
    
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Sun Sep 28 20:59:21 GMT 2025
    - 15K bytes
    - Click Count (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/OkHttpClientTest.kt

          builder.protocols(listOf(Protocol.HTTP_1_0, Protocol.HTTP_1_1))
        }
      }
    
      @Test fun certificatePinnerEquality() {
        val clientA = clientTestRule.newClient()
        val clientB = clientTestRule.newClient()
        assertThat(clientB.certificatePinner).isEqualTo(clientA.certificatePinner)
      }
    
      @Test fun nullInterceptorInList() {
        val builder = OkHttpClient.Builder()
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Feb 03 22:17:59 GMT 2026
    - 13.4K bytes
    - Click Count (1)
  8. okhttp/src/jvmTest/kotlin/okhttp3/BouncyCastleTest.kt

    class BouncyCastleTest {
      @JvmField @RegisterExtension
      var platform = PlatformRule()
    
      @JvmField @RegisterExtension
      val clientTestRule = OkHttpClientTestRule()
      var client = clientTestRule.newClient()
    
      @StartStop
      private val server = MockWebServer()
    
      @BeforeEach
      fun setUp() {
        OkHttpDebugLogging.enable("org.bouncycastle.jsse")
        platform.assumeBouncyCastle()
      }
    
      @Test
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Jun 18 12:28:21 GMT 2025
    - 1.6K bytes
    - Click Count (0)
  9. okhttp/src/jvmTest/java/okhttp3/CallJavaTest.java

    import static org.junit.jupiter.api.Assertions.assertEquals;
    
    public class CallJavaTest {
      @RegisterExtension
      OkHttpClientTestRule clientTestRule = new OkHttpClientTestRule();
    
      private OkHttpClient client = clientTestRule.newClient();
    
      @Test
      public void tagsSeededFromRequest() {
        Request request = new Request.Builder()
          .url(HttpUrl.get("https://square.com/"))
          .tag(Integer.class, 5)
          .tag(String.class, "hello")
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sun Oct 26 14:54:46 GMT 2025
    - 1.7K bytes
    - Click Count (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/OpenJSSETest.kt

    class OpenJSSETest {
      @JvmField @RegisterExtension
      var platform = PlatformRule()
    
      @JvmField @RegisterExtension
      val clientTestRule = OkHttpClientTestRule()
    
      var client = clientTestRule.newClient()
    
      @StartStop
      private val server = MockWebServer()
    
      @BeforeEach
      fun setUp() {
        platform.assumeOpenJSSE()
      }
    
      @Test
      fun testTlsv13Works() {
        enableTls()
    
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Jun 18 12:28:21 GMT 2025
    - 3.7K bytes
    - Click Count (0)
Back to Top