Search in sources :

Example 36 with IClientConfig

use of com.netflix.client.config.IClientConfig in project feign by OpenFeign.

the class RibbonClientTest method testFeignOptionsClientConfig.

@Test
public void testFeignOptionsClientConfig() {
    Request.Options options = new Request.Options(1111, 22222);
    IClientConfig config = new RibbonClient.FeignOptionsClientConfig(options);
    assertThat(config.get(CommonClientConfigKey.ConnectTimeout), equalTo(options.connectTimeoutMillis()));
    assertThat(config.get(CommonClientConfigKey.ReadTimeout), equalTo(options.readTimeoutMillis()));
    assertEquals(2, config.getProperties().size());
}
Also used : Request(feign.Request) IClientConfig(com.netflix.client.config.IClientConfig) Test(org.junit.Test)

Aggregations

IClientConfig (com.netflix.client.config.IClientConfig)36 Test (org.junit.Test)27 Server (com.netflix.loadbalancer.Server)20 ByteBuf (io.netty.buffer.ByteBuf)20 AvailabilityFilteringRule (com.netflix.loadbalancer.AvailabilityFilteringRule)18 BaseLoadBalancer (com.netflix.loadbalancer.BaseLoadBalancer)18 DummyPing (com.netflix.loadbalancer.DummyPing)18 MockWebServer (com.google.mockwebserver.MockWebServer)17 HttpServer (com.sun.net.httpserver.HttpServer)10 Person (com.netflix.ribbon.test.resources.EmbeddedResources.Person)9 ServerStats (com.netflix.loadbalancer.ServerStats)8 ExecutionListener (com.netflix.loadbalancer.reactive.ExecutionListener)7 MockResponse (com.google.mockwebserver.MockResponse)6 ClientException (com.netflix.client.ClientException)6 AbortExecutionException (com.netflix.loadbalancer.reactive.ExecutionListener.AbortExecutionException)5 HttpClientResponse (io.reactivex.netty.protocol.http.client.HttpClientResponse)5 RequestSpecificRetryHandler (com.netflix.client.RequestSpecificRetryHandler)4 RetryHandler (com.netflix.client.RetryHandler)4 HttpClientListener (io.reactivex.netty.servo.http.HttpClientListener)4 ExecutionContext (com.netflix.loadbalancer.reactive.ExecutionContext)3