Search in sources :

Example 21 with FailoverFeature

use of org.apache.cxf.clustering.FailoverFeature in project cxf by apache.

the class AbstractFailoverTest method testRandomStrategyWebClient.

@Test
public void testRandomStrategyWebClient() throws Exception {
    FailoverFeature feature = getFeature(true, Server.ADDRESS3, Server.ADDRESS2);
    strategyTestWebClient(Server.ADDRESS1, feature, Server.ADDRESS3, Server.ADDRESS2, false, true);
}
Also used : FailoverFeature(org.apache.cxf.clustering.FailoverFeature) Test(org.junit.Test)

Example 22 with FailoverFeature

use of org.apache.cxf.clustering.FailoverFeature in project cxf by apache.

the class AbstractFailoverTest method testSequentialStrategyFailure.

@Test(expected = ProcessingException.class)
public void testSequentialStrategyFailure() throws Exception {
    FailoverFeature feature = getFeature(false, "http://localhost:" + NON_PORT + "/non-existent");
    strategyTest(Server.ADDRESS1, feature, null, null, false, false, false);
}
Also used : FailoverFeature(org.apache.cxf.clustering.FailoverFeature) Test(org.junit.Test)

Example 23 with FailoverFeature

use of org.apache.cxf.clustering.FailoverFeature in project cxf by apache.

the class AbstractFailoverTest method testRandomStrategy2.

@Test
public void testRandomStrategy2() throws Exception {
    FailoverFeature feature = getFeature(true, Server.ADDRESS2, Server.ADDRESS3);
    strategyTest(Server.ADDRESS1, feature, Server.ADDRESS2, Server.ADDRESS3, false, true, false);
}
Also used : FailoverFeature(org.apache.cxf.clustering.FailoverFeature) Test(org.junit.Test)

Example 24 with FailoverFeature

use of org.apache.cxf.clustering.FailoverFeature in project cxf by apache.

the class AbstractFailoverTest method testSequentialStrategy.

@Test
public void testSequentialStrategy() throws Exception {
    FailoverFeature feature = getFeature(false, Server.ADDRESS2, Server.ADDRESS3);
    strategyTest(Server.ADDRESS1, feature, Server.ADDRESS2, null, false, false, false);
}
Also used : FailoverFeature(org.apache.cxf.clustering.FailoverFeature) Test(org.junit.Test)

Example 25 with FailoverFeature

use of org.apache.cxf.clustering.FailoverFeature in project cxf by apache.

the class AbstractFailoverTest method testRandomStrategy.

@Test
public void testRandomStrategy() throws Exception {
    FailoverFeature feature = getFeature(true, Server.ADDRESS2, Server.ADDRESS3);
    strategyTest(Server.ADDRESS1, feature, Server.ADDRESS2, Server.ADDRESS3, false, true, true);
}
Also used : FailoverFeature(org.apache.cxf.clustering.FailoverFeature) Test(org.junit.Test)

Aggregations

FailoverFeature (org.apache.cxf.clustering.FailoverFeature)29 Test (org.junit.Test)25 ArrayList (java.util.ArrayList)7 CircuitBreakerFailoverFeature (org.apache.cxf.clustering.circuitbreaker.CircuitBreakerFailoverFeature)7 RandomStrategy (org.apache.cxf.clustering.RandomStrategy)4 SequentialStrategy (org.apache.cxf.clustering.SequentialStrategy)4 WebClient (org.apache.cxf.jaxrs.client.WebClient)4 ProcessingException (javax.ws.rs.ProcessingException)3 Book (org.apache.cxf.systest.jaxrs.Book)3 BookStore (org.apache.cxf.systest.jaxrs.BookStore)3 URL (java.net.URL)2 RetryStrategy (org.apache.cxf.clustering.RetryStrategy)2 JAXRSClientFactoryBean (org.apache.cxf.jaxrs.client.JAXRSClientFactoryBean)2 JaxWsProxyFactoryBean (org.apache.cxf.jaxws.JaxWsProxyFactoryBean)2 IOException (java.io.IOException)1 List (java.util.List)1 Response (javax.ws.rs.core.Response)1 QName (javax.xml.namespace.QName)1 Service (javax.xml.ws.Service)1 RouteBuilder (org.apache.camel.builder.RouteBuilder)1