Search in sources :

Example 1 with BootstrapModule

use of com.netflix.conductor.bootstrap.BootstrapModule 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);
}
Also used : TaskClient(com.netflix.conductor.client.http.TaskClient) MetadataClient(com.netflix.conductor.client.http.MetadataClient) Injector(com.google.inject.Injector) JettyServer(com.netflix.conductor.jetty.server.JettyServer) WorkflowClient(com.netflix.conductor.client.http.WorkflowClient) EmbeddedElasticSearchProvider(com.netflix.conductor.elasticsearch.EmbeddedElasticSearchProvider) BootstrapModule(com.netflix.conductor.bootstrap.BootstrapModule) BeforeClass(org.junit.BeforeClass)

Example 2 with BootstrapModule

use of com.netflix.conductor.bootstrap.BootstrapModule in project conductor by Netflix.

the class MySQLGrpcEndToEndTest method setup.

@BeforeClass
public static void setup() throws Exception {
    TestEnvironment.setup();
    System.setProperty(GRPCServerConfiguration.ENABLED_PROPERTY_NAME, "true");
    System.setProperty(GRPCServerConfiguration.PORT_PROPERTY_NAME, "8094");
    System.setProperty(ElasticSearchConfiguration.EMBEDDED_PORT_PROPERTY_NAME, "9204");
    System.setProperty(ElasticSearchConfiguration.ELASTIC_SEARCH_URL_PROPERTY_NAME, "localhost:9304");
    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();
    Optional<GRPCServer> server = serverInjector.getInstance(GRPCServerProvider.class).get();
    assertTrue("failed to instantiate GRPCServer", server.isPresent());
    server.get().start();
    taskClient = new TaskClient("localhost", SERVER_PORT);
    workflowClient = new WorkflowClient("localhost", SERVER_PORT);
    metadataClient = new MetadataClient("localhost", SERVER_PORT);
}
Also used : GRPCServerProvider(com.netflix.conductor.grpc.server.GRPCServerProvider) TaskClient(com.netflix.conductor.client.grpc.TaskClient) GRPCServer(com.netflix.conductor.grpc.server.GRPCServer) MetadataClient(com.netflix.conductor.client.grpc.MetadataClient) Injector(com.google.inject.Injector) WorkflowClient(com.netflix.conductor.client.grpc.WorkflowClient) EmbeddedElasticSearchProvider(com.netflix.conductor.elasticsearch.EmbeddedElasticSearchProvider) BootstrapModule(com.netflix.conductor.bootstrap.BootstrapModule) BeforeClass(org.junit.BeforeClass)

Example 3 with BootstrapModule

use of com.netflix.conductor.bootstrap.BootstrapModule 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);
}
Also used : TaskClient(com.netflix.conductor.client.http.TaskClient) MetadataClient(com.netflix.conductor.client.http.MetadataClient) Injector(com.google.inject.Injector) SystemPropertiesElasticSearchConfiguration(com.netflix.conductor.elasticsearch.SystemPropertiesElasticSearchConfiguration) JettyServer(com.netflix.conductor.jetty.server.JettyServer) WorkflowClient(com.netflix.conductor.client.http.WorkflowClient) EmbeddedElasticSearchProvider(com.netflix.conductor.elasticsearch.EmbeddedElasticSearchProvider) BootstrapModule(com.netflix.conductor.bootstrap.BootstrapModule) ElasticSearchRestClientProvider(com.netflix.conductor.elasticsearch.ElasticSearchRestClientProvider) BeforeClass(org.junit.BeforeClass)

Example 4 with BootstrapModule

use of com.netflix.conductor.bootstrap.BootstrapModule in project conductor by Netflix.

the class GrpcEndToEndTest method setup.

@BeforeClass
public static void setup() throws Exception {
    TestEnvironment.setup();
    System.setProperty(GRPCServerConfiguration.ENABLED_PROPERTY_NAME, "true");
    System.setProperty(GRPCServerConfiguration.PORT_PROPERTY_NAME, "8092");
    System.setProperty(ElasticSearchConfiguration.EMBEDDED_PORT_PROPERTY_NAME, "9202");
    System.setProperty(ElasticSearchConfiguration.ELASTIC_SEARCH_URL_PROPERTY_NAME, "localhost:9302");
    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();
    Optional<GRPCServer> server = serverInjector.getInstance(GRPCServerProvider.class).get();
    assertTrue("failed to instantiate GRPCServer", server.isPresent());
    server.get().start();
    taskClient = new TaskClient("localhost", SERVER_PORT);
    workflowClient = new WorkflowClient("localhost", SERVER_PORT);
    metadataClient = new MetadataClient("localhost", SERVER_PORT);
}
Also used : GRPCServerProvider(com.netflix.conductor.grpc.server.GRPCServerProvider) TaskClient(com.netflix.conductor.client.grpc.TaskClient) GRPCServer(com.netflix.conductor.grpc.server.GRPCServer) MetadataClient(com.netflix.conductor.client.grpc.MetadataClient) Injector(com.google.inject.Injector) WorkflowClient(com.netflix.conductor.client.grpc.WorkflowClient) EmbeddedElasticSearchProvider(com.netflix.conductor.elasticsearch.EmbeddedElasticSearchProvider) BootstrapModule(com.netflix.conductor.bootstrap.BootstrapModule) BeforeClass(org.junit.BeforeClass)

Example 5 with BootstrapModule

use of com.netflix.conductor.bootstrap.BootstrapModule 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);
}
Also used : TaskClient(com.netflix.conductor.client.http.TaskClient) MetadataClient(com.netflix.conductor.client.http.MetadataClient) Injector(com.google.inject.Injector) JettyServer(com.netflix.conductor.jetty.server.JettyServer) WorkflowClient(com.netflix.conductor.client.http.WorkflowClient) EmbeddedElasticSearchProvider(com.netflix.conductor.elasticsearch.EmbeddedElasticSearchProvider) BootstrapModule(com.netflix.conductor.bootstrap.BootstrapModule) BeforeClass(org.junit.BeforeClass)

Aggregations

Injector (com.google.inject.Injector)6 BootstrapModule (com.netflix.conductor.bootstrap.BootstrapModule)6 EmbeddedElasticSearchProvider (com.netflix.conductor.elasticsearch.EmbeddedElasticSearchProvider)6 BeforeClass (org.junit.BeforeClass)6 MetadataClient (com.netflix.conductor.client.grpc.MetadataClient)3 TaskClient (com.netflix.conductor.client.grpc.TaskClient)3 WorkflowClient (com.netflix.conductor.client.grpc.WorkflowClient)3 MetadataClient (com.netflix.conductor.client.http.MetadataClient)3 TaskClient (com.netflix.conductor.client.http.TaskClient)3 WorkflowClient (com.netflix.conductor.client.http.WorkflowClient)3 JettyServer (com.netflix.conductor.jetty.server.JettyServer)3 GRPCServer (com.netflix.conductor.grpc.server.GRPCServer)2 GRPCServerProvider (com.netflix.conductor.grpc.server.GRPCServerProvider)2 ElasticSearchRestClientProvider (com.netflix.conductor.elasticsearch.ElasticSearchRestClientProvider)1 SystemPropertiesElasticSearchConfiguration (com.netflix.conductor.elasticsearch.SystemPropertiesElasticSearchConfiguration)1