Search in sources :

Example 6 with Endpoint

use of org.talend.esb.servicelocator.client.Endpoint in project tesb-rt-se by Talend.

the class RegisterEndpointProviderTest method registerServiceExistsEndpointExistsNot.

@Ignore
@Test
public void registerServiceExistsEndpointExistsNot() throws Exception {
    Endpoint endpoint = create(SERVICE_QNAME_1, ENDPOINT_1);
    serviceExists(SERVICE_PATH_1);
    endpointExistsNot(ENDPOINT_PATH_11);
    ep2Data(endpoint, NEW_DATA);
    createEndpointAndSetData(ENDPOINT_PATH_11, NEW_DATA);
    createEndpointStatus(ENDPOINT_PATH_11);
    replayAll();
    ServiceLocatorImpl slc = createServiceLocatorSuccess();
    slc.setEndpointTransformer(trans);
    slc.register(endpoint);
    verifyAll();
}
Also used : Endpoint(org.talend.esb.servicelocator.client.Endpoint) SLEndpoint(org.talend.esb.servicelocator.client.SLEndpoint) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 7 with Endpoint

use of org.talend.esb.servicelocator.client.Endpoint in project tesb-rt-se by Talend.

the class RegisterEndpointProviderTest method registerServiceExistsNotWithAuthentication.

@Ignore
@Test
public void registerServiceExistsNotWithAuthentication() throws Exception {
    Endpoint endpoint = create(SERVICE_QNAME_1, ENDPOINT_1);
    setAuthentication(true);
    zkMock.addAuthInfo(eq("sl"), aryEq(USER_NAME_PASSWORD_BYTES));
    serviceExistsNot(SERVICE_PATH_1);
    createService(SERVICE_PATH_1);
    endpointExistsNot(ENDPOINT_PATH_11);
    ep2Data(endpoint, NEW_DATA);
    createEndpointAndSetData(ENDPOINT_PATH_11, NEW_DATA);
    createEndpointStatus(ENDPOINT_PATH_11);
    replayAll();
    ServiceLocatorImpl slc = createServiceLocatorSuccess();
    slc.setEndpointTransformer(trans);
    // slc.setName(USER_NAME);
    // slc.setPassword(PASSWORD);
    slc.register(endpoint);
    verifyAll();
}
Also used : Endpoint(org.talend.esb.servicelocator.client.Endpoint) SLEndpoint(org.talend.esb.servicelocator.client.SLEndpoint) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 8 with Endpoint

use of org.talend.esb.servicelocator.client.Endpoint in project tesb-rt-se by Talend.

the class RegisterEndpointProviderTest method registerEndpointStatusExists.

@Ignore
@Test
public void registerEndpointStatusExists() throws Exception {
    Endpoint endpoint = create(SERVICE_QNAME_1, ENDPOINT_1);
    serviceExists(SERVICE_PATH_1);
    endpointExists(ENDPOINT_PATH_11);
    getData(ENDPOINT_PATH_11, OLD_DATA);
    data2Ep(SERVICE_QNAME_1, OLD_DATA);
    ep2Data(endpoint, NEW_DATA);
    setData(ENDPOINT_PATH_11, NEW_DATA);
    createEndpointStatusFails(ENDPOINT_PATH_11);
    replayAll();
    ServiceLocatorImpl slc = createServiceLocatorSuccess();
    slc.setEndpointTransformer(trans);
    slc.register(endpoint);
    verifyAll();
}
Also used : Endpoint(org.talend.esb.servicelocator.client.Endpoint) SLEndpoint(org.talend.esb.servicelocator.client.SLEndpoint) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 9 with Endpoint

use of org.talend.esb.servicelocator.client.Endpoint in project tesb-rt-se by Talend.

the class RegisterEndpointProviderTest method unregisterEndpointExistsNot.

@Ignore
@Test
public void unregisterEndpointExistsNot() throws Exception {
    endpointExistsNot(ENDPOINT_PATH_11);
    Endpoint eprProvider = create(SERVICE_QNAME_1, ENDPOINT_1);
    replayAll();
    ServiceLocatorImpl slc = createServiceLocatorSuccess();
    slc.setEndpointTransformer(trans);
    slc.unregister(eprProvider);
    verifyAll();
}
Also used : Endpoint(org.talend.esb.servicelocator.client.Endpoint) SLEndpoint(org.talend.esb.servicelocator.client.SLEndpoint) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 10 with Endpoint

use of org.talend.esb.servicelocator.client.Endpoint in project tesb-rt-se by Talend.

the class RegisterEndpointProviderTest method registerServiceExistsNotButConcurrentlyCreated.

@Ignore
@Test
public void registerServiceExistsNotButConcurrentlyCreated() throws Exception {
    Endpoint endpoint = create(SERVICE_QNAME_1, ENDPOINT_1);
    serviceExistsNot(SERVICE_PATH_1);
    createServiceFails(SERVICE_PATH_1);
    endpointExistsNot(ENDPOINT_PATH_11);
    ep2Data(endpoint, NEW_DATA);
    createEndpointAndSetData(ENDPOINT_PATH_11, NEW_DATA);
    createEndpointStatus(ENDPOINT_PATH_11);
    replayAll();
    ServiceLocatorImpl slc = createServiceLocatorSuccess();
    slc.setEndpointTransformer(trans);
    slc.register(endpoint);
    verifyAll();
}
Also used : Endpoint(org.talend.esb.servicelocator.client.Endpoint) SLEndpoint(org.talend.esb.servicelocator.client.SLEndpoint) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

Endpoint (org.talend.esb.servicelocator.client.Endpoint)14 SLEndpoint (org.talend.esb.servicelocator.client.SLEndpoint)12 Test (org.junit.Test)11 Ignore (org.junit.Ignore)10 ServiceLocatorException (org.talend.esb.servicelocator.client.ServiceLocatorException)3 WebApplicationException (javax.ws.rs.WebApplicationException)2 QName (javax.xml.namespace.QName)2 Capture (org.easymock.Capture)2 EasyMock.anyLong (org.easymock.EasyMock.anyLong)2 SimpleEndpoint (org.talend.esb.servicelocator.client.SimpleEndpoint)2 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 KeeperException (org.apache.zookeeper.KeeperException)1 BindingType (org.talend.esb.servicelocator.client.BindingType)1 SLPropertiesImpl (org.talend.esb.servicelocator.client.SLPropertiesImpl)1 SLPropertiesMatcher (org.talend.esb.servicelocator.client.SLPropertiesMatcher)1 TransportType (org.talend.esb.servicelocator.client.TransportType)1 EndpointReferenceList (org.talend.schemas.esb.locator.rest._2011._11.EndpointReferenceList)1 EntryType (org.talend.schemas.esb.locator.rest._2011._11.EntryType)1 Document (org.w3c.dom.Document)1