use of com.netflix.conductor.client.http.MetadataClient in project conductor by Netflix.
the class ExclusiveJoinEndToEndTest method setUp.
@BeforeClass
public static void setUp() throws Exception {
TestEnvironment.setup();
System.setProperty(ElasticSearchConfiguration.EMBEDDED_PORT_PROPERTY_NAME, "9205");
System.setProperty(ElasticSearchConfiguration.ELASTIC_SEARCH_URL_PROPERTY_NAME, "localhost:9305");
System.setProperty(Configuration.EXECUTION_LOCK_ENABLED_PROPERTY_NAME, "false");
Injector bootInjector = Guice.createInjector(new BootstrapModule());
Injector serverInjector = Guice.createInjector(bootInjector.getInstance(ModulesProvider.class).get());
search = serverInjector.getInstance(EmbeddedElasticSearchProvider.class).get().get();
search.start();
JettyServer server = new JettyServer(SERVER_PORT, false);
server.start();
String apiRoot = String.format("http://localhost:%d/api/", SERVER_PORT);
taskClient = new TaskClient();
taskClient.setRootURI(apiRoot);
workflowClient = new WorkflowClient();
workflowClient.setRootURI(apiRoot);
metadataClient = new MetadataClient();
metadataClient.setRootURI(apiRoot);
}
use of com.netflix.conductor.client.http.MetadataClient in project conductor by Netflix.
the class AbstractHttpEndToEndTest method testInvalidResource.
@Test(expected = ConductorClientException.class)
public void testInvalidResource() {
MetadataClient metadataClient = new MetadataClient();
metadataClient.setRootURI(String.format("%sinvalid", apiRoot));
WorkflowDef def = new WorkflowDef();
def.setName("testWorkflowDel");
def.setVersion(1);
try {
metadataClient.registerWorkflowDef(def);
} catch (ConductorClientException e) {
int statusCode = e.getStatus();
boolean retryable = e.isRetryable();
assertEquals(404, statusCode);
assertFalse(retryable);
throw e;
}
}
use of com.netflix.conductor.client.http.MetadataClient in project conductor by Netflix.
the class ESRestClientHttpEndToEndTest method setup.
@BeforeClass
public static void setup() throws Exception {
TestEnvironment.setup();
System.setProperty(ElasticSearchConfiguration.EMBEDDED_PORT_PROPERTY_NAME, "9203");
System.setProperty(ElasticSearchConfiguration.ELASTIC_SEARCH_URL_PROPERTY_NAME, "http://localhost:9203");
System.setProperty(ElasticSearchConfiguration.ELASTIC_SEARCH_INDEX_BATCH_SIZE_PROPERTY_NAME, "1");
Injector bootInjector = Guice.createInjector(new BootstrapModule());
Injector serverInjector = Guice.createInjector(bootInjector.getInstance(ModulesProvider.class).get());
search = serverInjector.getInstance(EmbeddedElasticSearchProvider.class).get().get();
search.start();
search.waitForGreenCluster();
SystemPropertiesElasticSearchConfiguration configuration = new SystemPropertiesElasticSearchConfiguration();
ElasticSearchRestClientProvider restClientProvider = new ElasticSearchRestClientProvider(configuration);
elasticSearchAdminClient = restClientProvider.get();
JettyServer server = new JettyServer(SERVER_PORT, false);
server.start();
apiRoot = String.format("http://localhost:%d/api/", SERVER_PORT);
taskClient = new TaskClient();
taskClient.setRootURI(apiRoot);
workflowClient = new WorkflowClient();
workflowClient.setRootURI(apiRoot);
metadataClient = new MetadataClient();
metadataClient.setRootURI(apiRoot);
}
use of com.netflix.conductor.client.http.MetadataClient in project conductor by Netflix.
the class HttpEndToEndTest method setup.
@BeforeClass
public static void setup() throws Exception {
TestEnvironment.setup();
System.setProperty(ElasticSearchConfiguration.EMBEDDED_PORT_PROPERTY_NAME, "9201");
System.setProperty(ElasticSearchConfiguration.ELASTIC_SEARCH_URL_PROPERTY_NAME, "localhost:9301");
System.setProperty(Configuration.EXECUTION_LOCK_ENABLED_PROPERTY_NAME, "false");
Injector bootInjector = Guice.createInjector(new BootstrapModule());
Injector serverInjector = Guice.createInjector(bootInjector.getInstance(ModulesProvider.class).get());
search = serverInjector.getInstance(EmbeddedElasticSearchProvider.class).get().get();
search.start();
JettyServer server = new JettyServer(SERVER_PORT, false);
server.start();
apiRoot = String.format("http://localhost:%d/api/", SERVER_PORT);
taskClient = new TaskClient();
taskClient.setRootURI(apiRoot);
workflowClient = new WorkflowClient();
workflowClient.setRootURI(apiRoot);
metadataClient = new MetadataClient();
metadataClient.setRootURI(apiRoot);
}
use of com.netflix.conductor.client.http.MetadataClient in project conductor by Netflix.
the class TestJettyServer method getMetaDataClient.
public static MetadataClient getMetaDataClient() {
MetadataClient metadataClient = new MetadataClient();
metadataClient.setRootURI(API_ROOT);
return metadataClient;
}
Aggregations