Search in sources :

Example 16 with ServiceManager

use of io.cdap.cdap.test.ServiceManager in project cdap by caskdata.

the class TestFrameworkTestRun method testAppWithServices.

@Category(SlowTests.class)
@Test
public void testAppWithServices() throws Exception {
    ApplicationManager applicationManager = deployApplication(AppWithServices.class);
    LOG.info("Deployed.");
    ServiceManager serviceManager = applicationManager.getServiceManager(AppWithServices.SERVICE_NAME).start();
    serviceManager.waitForRun(ProgramRunStatus.RUNNING, 10, TimeUnit.SECONDS);
    LOG.info("Service Started");
    URL serviceURL = serviceManager.getServiceURL(15, TimeUnit.SECONDS);
    Assert.assertNotNull(serviceURL);
    // Call the ping endpoint
    URL url = new URL(serviceURL, "ping2");
    HttpRequest request = HttpRequest.get(url).build();
    HttpResponse response = executeHttp(request);
    Assert.assertEquals(200, response.getResponseCode());
    // Call the failure endpoint
    url = new URL(serviceURL, "failure");
    request = HttpRequest.get(url).build();
    response = executeHttp(request);
    Assert.assertEquals(500, response.getResponseCode());
    Assert.assertTrue(response.getResponseBodyAsString().contains("Exception"));
    // Call the verify ClassLoader endpoint
    url = new URL(serviceURL, "verifyClassLoader");
    request = HttpRequest.get(url).build();
    response = executeHttp(request);
    Assert.assertEquals(200, response.getResponseCode());
    RuntimeMetrics serviceMetrics = serviceManager.getMetrics();
    serviceMetrics.waitForinput(3, 5, TimeUnit.SECONDS);
    Assert.assertEquals(3, serviceMetrics.getInput());
    Assert.assertEquals(2, serviceMetrics.getProcessed());
    Assert.assertEquals(1, serviceMetrics.getException());
    // in the AppWithServices the handlerName is same as the serviceName - "ServerService" handler
    RuntimeMetrics handlerMetrics = getMetricsManager().getServiceHandlerMetrics(NamespaceId.DEFAULT.getNamespace(), AppWithServices.APP_NAME, AppWithServices.SERVICE_NAME, AppWithServices.SERVICE_NAME);
    handlerMetrics.waitForinput(3, 5, TimeUnit.SECONDS);
    Assert.assertEquals(3, handlerMetrics.getInput());
    Assert.assertEquals(2, handlerMetrics.getProcessed());
    Assert.assertEquals(1, handlerMetrics.getException());
    // we can verify metrics, by adding getServiceMetrics in MetricsManager and then disabling the system scope test in
    // TestMetricsCollectionService
    LOG.info("DatasetUpdateService Started");
    Map<String, String> args = ImmutableMap.of(AppWithServices.WRITE_VALUE_RUN_KEY, AppWithServices.DATASET_TEST_VALUE, AppWithServices.WRITE_VALUE_STOP_KEY, AppWithServices.DATASET_TEST_VALUE_STOP);
    ServiceManager datasetWorkerServiceManager = applicationManager.getServiceManager(AppWithServices.DATASET_WORKER_SERVICE_NAME).start(args);
    WorkerManager datasetWorker = applicationManager.getWorkerManager(AppWithServices.DATASET_UPDATE_WORKER).start(args);
    datasetWorker.waitForRun(ProgramRunStatus.RUNNING, 10, TimeUnit.SECONDS);
    datasetWorkerServiceManager.waitForRun(ProgramRunStatus.RUNNING, 10, TimeUnit.SECONDS);
    ServiceManager noopManager = applicationManager.getServiceManager("NoOpService").start();
    noopManager.waitForRun(ProgramRunStatus.RUNNING, 10, TimeUnit.SECONDS);
    // We don't know when the datasetWorker run() method executed, hence need to retry on the service call
    // until it can get a value from a dataset, which was written out by the datasetWorker.
    AtomicInteger called = new AtomicInteger(0);
    AtomicInteger failed = new AtomicInteger(0);
    Tasks.waitFor(AppWithServices.DATASET_TEST_VALUE, new Callable<String>() {

        @Override
        public String call() throws Exception {
            URL url = noopManager.getServiceURL();
            String path = "ping/" + AppWithServices.DATASET_TEST_KEY;
            try {
                called.incrementAndGet();
                return new Gson().fromJson(callServiceGet(url, path), String.class);
            } catch (IOException e) {
                failed.incrementAndGet();
                LOG.debug("Exception when reading from service {}/{}", url, path, e);
            }
            return null;
        }
    }, 30, TimeUnit.SECONDS);
    // Validates the metrics emitted by the service call.
    handlerMetrics = getMetricsManager().getServiceHandlerMetrics(NamespaceId.DEFAULT.getNamespace(), AppWithServices.APP_NAME, "NoOpService", "NoOpHandler");
    handlerMetrics.waitForinput(called.get(), 5, TimeUnit.SECONDS);
    handlerMetrics.waitForProcessed(1, 5, TimeUnit.SECONDS);
    handlerMetrics.waitForException(failed.get(), 5, TimeUnit.SECONDS);
    // Test that a service can discover another service
    String path = String.format("discover/%s/%s", AppWithServices.APP_NAME, AppWithServices.DATASET_WORKER_SERVICE_NAME);
    url = new URL(serviceURL, path);
    request = HttpRequest.get(url).build();
    response = executeHttp(request);
    Assert.assertEquals(200, response.getResponseCode());
    datasetWorker.stop();
    datasetWorker.waitForStopped(10, TimeUnit.SECONDS);
    datasetWorkerServiceManager.stop();
    datasetWorkerServiceManager.waitForStopped(10, TimeUnit.SECONDS);
    LOG.info("DatasetUpdateService Stopped");
    serviceManager.stop();
    serviceManager.waitForStopped(10, TimeUnit.SECONDS);
    LOG.info("ServerService Stopped");
    // Since all worker are stopped, we can just hit the service to read the dataset. No retry needed.
    String result = callServiceGet(noopManager.getServiceURL(), "ping/" + AppWithServices.DATASET_TEST_KEY_STOP);
    String decodedResult = new Gson().fromJson(result, String.class);
    Assert.assertEquals(AppWithServices.DATASET_TEST_VALUE_STOP, decodedResult);
    result = callServiceGet(noopManager.getServiceURL(), "ping/" + AppWithServices.DATASET_TEST_KEY_STOP_2);
    decodedResult = new Gson().fromJson(result, String.class);
    Assert.assertEquals(AppWithServices.DATASET_TEST_VALUE_STOP_2, decodedResult);
}
Also used : HttpRequest(io.cdap.common.http.HttpRequest) ApplicationManager(io.cdap.cdap.test.ApplicationManager) RuntimeMetrics(io.cdap.cdap.api.metrics.RuntimeMetrics) HttpResponse(io.cdap.common.http.HttpResponse) Gson(com.google.gson.Gson) IOException(java.io.IOException) URL(java.net.URL) IOException(java.io.IOException) ConflictException(io.cdap.cdap.common.ConflictException) WorkerManager(io.cdap.cdap.test.WorkerManager) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) ServiceManager(io.cdap.cdap.test.ServiceManager) Category(org.junit.experimental.categories.Category) Test(org.junit.Test)

Example 17 with ServiceManager

use of io.cdap.cdap.test.ServiceManager in project cdap by caskdata.

the class TestFrameworkTestRun method testTransactionHandlerService.

@Test
public void testTransactionHandlerService() throws Exception {
    ApplicationManager applicationManager = deployApplication(testSpace, AppWithServices.class);
    LOG.info("Deployed.");
    ServiceManager serviceManager = applicationManager.getServiceManager(AppWithServices.TRANSACTIONS_SERVICE_NAME).start();
    serviceManager.waitForRun(ProgramRunStatus.RUNNING, 10, TimeUnit.SECONDS);
    LOG.info("Service Started");
    final URL baseUrl = serviceManager.getServiceURL(15, TimeUnit.SECONDS);
    Assert.assertNotNull(baseUrl);
    // Make a request to write in a separate thread and wait for it to return.
    ExecutorService executorService = Executors.newSingleThreadExecutor();
    Future<Integer> requestFuture = executorService.submit(new Callable<Integer>() {

        @Override
        public Integer call() throws Exception {
            try {
                URL url = new URL(String.format("%s/write/%s/%s/%d", baseUrl, AppWithServices.DATASET_TEST_KEY, AppWithServices.DATASET_TEST_VALUE, 10000));
                HttpRequest request = HttpRequest.get(url).build();
                HttpResponse response = executeHttp(request);
                return response.getResponseCode();
            } catch (Exception e) {
                LOG.error("Request thread got exception.", e);
                throw Throwables.propagate(e);
            }
        }
    });
    // The dataset should not be written by the time this request is made, since the transaction to write
    // has not been committed yet.
    URL url = new URL(String.format("%s/read/%s", baseUrl, AppWithServices.DATASET_TEST_KEY));
    HttpRequest request = HttpRequest.get(url).build();
    HttpResponse response = executeHttp(request);
    Assert.assertEquals(204, response.getResponseCode());
    // Wait for the transaction to commit.
    Integer writeStatusCode = requestFuture.get();
    Assert.assertEquals(200, writeStatusCode.intValue());
    // Make the same request again. By now the transaction should've completed.
    request = HttpRequest.get(url).build();
    response = executeHttp(request);
    Assert.assertEquals(200, response.getResponseCode());
    Assert.assertEquals(AppWithServices.DATASET_TEST_VALUE, new Gson().fromJson(response.getResponseBodyAsString(), String.class));
    executorService.shutdown();
    serviceManager.stop();
    serviceManager.waitForStopped(10, TimeUnit.SECONDS);
    DataSetManager<KeyValueTable> dsManager = getDataset(testSpace.dataset(AppWithServices.TRANSACTIONS_DATASET_NAME));
    String value = Bytes.toString(dsManager.get().read(AppWithServices.DESTROY_KEY));
    Assert.assertEquals(AppWithServices.VALUE, value);
}
Also used : HttpRequest(io.cdap.common.http.HttpRequest) ApplicationManager(io.cdap.cdap.test.ApplicationManager) HttpResponse(io.cdap.common.http.HttpResponse) Gson(com.google.gson.Gson) URL(java.net.URL) IOException(java.io.IOException) ConflictException(io.cdap.cdap.common.ConflictException) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) ServiceManager(io.cdap.cdap.test.ServiceManager) KeyValueTable(io.cdap.cdap.api.dataset.lib.KeyValueTable) ExecutorService(java.util.concurrent.ExecutorService) Test(org.junit.Test)

Example 18 with ServiceManager

use of io.cdap.cdap.test.ServiceManager in project cdap by cdapio.

the class TestAppWithCube method testApp.

@Category(SlowTests.class)
@Test
public void testApp() throws Exception {
    // Deploy the application
    ApplicationManager appManager = deployApplication(AppWithCube.class);
    ServiceManager serviceManager = appManager.getServiceManager(AppWithCube.SERVICE_NAME).start();
    try {
        serviceManager.waitForRun(ProgramRunStatus.RUNNING, 10, TimeUnit.SECONDS);
        URL url = serviceManager.getServiceURL();
        long tsInSec = System.currentTimeMillis() / 1000;
        // round to a minute for testing minute resolution
        tsInSec = (tsInSec / 60) * 60;
        // add couple facts
        add(url, ImmutableList.of(new CubeFact(tsInSec).addDimensionValue("user", "alex").addDimensionValue("action", "click").addMeasurement("count", MeasureType.COUNTER, 1)));
        add(url, ImmutableList.of(new CubeFact(tsInSec).addDimensionValue("user", "alex").addDimensionValue("action", "click").addMeasurement("count", MeasureType.COUNTER, 1), new CubeFact(tsInSec + 1).addDimensionValue("user", "alex").addDimensionValue("action", "back").addMeasurement("count", MeasureType.COUNTER, 1), new CubeFact(tsInSec + 2).addDimensionValue("user", "alex").addDimensionValue("action", "click").addMeasurement("count", MeasureType.COUNTER, 1)));
        // search for tags
        Collection<DimensionValue> tags = searchDimensionValue(url, new CubeExploreQuery(tsInSec - 60, tsInSec + 60, 1, 100, new ArrayList<DimensionValue>()));
        Assert.assertEquals(1, tags.size());
        DimensionValue tv = tags.iterator().next();
        Assert.assertEquals("user", tv.getName());
        Assert.assertEquals("alex", tv.getValue());
        tags = searchDimensionValue(url, CubeExploreQuery.builder().from().resolution(1, TimeUnit.SECONDS).where().dimension("user", "alex").timeRange(tsInSec - 60, tsInSec + 60).limit(100).build());
        Assert.assertEquals(2, tags.size());
        Iterator<DimensionValue> iterator = tags.iterator();
        tv = iterator.next();
        Assert.assertEquals("action", tv.getName());
        Assert.assertEquals("back", tv.getValue());
        tv = iterator.next();
        Assert.assertEquals("action", tv.getName());
        Assert.assertEquals("click", tv.getValue());
        // search for measures
        Collection<String> measures = searchMeasure(url, new CubeExploreQuery(tsInSec - 60, tsInSec + 60, 1, 100, ImmutableList.of(new DimensionValue("user", "alex"))));
        Assert.assertEquals(1, measures.size());
        String measure = measures.iterator().next();
        Assert.assertEquals("count", measure);
        // query for data
        // 1-sec resolution
        Collection<TimeSeries> data = query(url, CubeQuery.builder().select().measurement("count", AggregationFunction.SUM).from(null).resolution(1, TimeUnit.SECONDS).where().dimension("action", "click").timeRange(tsInSec - 60, tsInSec + 60).limit(100).build());
        Assert.assertEquals(1, data.size());
        TimeSeries series = data.iterator().next();
        List<TimeValue> timeValues = series.getTimeValues();
        Assert.assertEquals(2, timeValues.size());
        TimeValue timeValue = timeValues.get(0);
        Assert.assertEquals(tsInSec, timeValue.getTimestamp());
        Assert.assertEquals(2, timeValue.getValue());
        timeValue = timeValues.get(1);
        Assert.assertEquals(tsInSec + 2, timeValue.getTimestamp());
        Assert.assertEquals(1, timeValue.getValue());
        // 60-sec resolution
        data = query(url, new CubeQuery(null, tsInSec - 60, tsInSec + 60, 60, 100, ImmutableMap.of("count", AggregationFunction.SUM), ImmutableMap.of("action", "click"), new ArrayList<String>(), null, null));
        Assert.assertEquals(1, data.size());
        series = data.iterator().next();
        timeValues = series.getTimeValues();
        Assert.assertEquals(1, timeValues.size());
        timeValue = timeValues.get(0);
        Assert.assertEquals(tsInSec, timeValue.getTimestamp());
        Assert.assertEquals(3, timeValue.getValue());
    } finally {
        serviceManager.stop();
        serviceManager.waitForStopped(10, TimeUnit.SECONDS);
    }
}
Also used : ApplicationManager(io.cdap.cdap.test.ApplicationManager) TimeSeries(io.cdap.cdap.api.dataset.lib.cube.TimeSeries) ArrayList(java.util.ArrayList) CubeQuery(io.cdap.cdap.api.dataset.lib.cube.CubeQuery) URL(java.net.URL) CubeFact(io.cdap.cdap.api.dataset.lib.cube.CubeFact) DimensionValue(io.cdap.cdap.api.dataset.lib.cube.DimensionValue) ServiceManager(io.cdap.cdap.test.ServiceManager) CubeExploreQuery(io.cdap.cdap.api.dataset.lib.cube.CubeExploreQuery) TimeValue(io.cdap.cdap.api.dataset.lib.cube.TimeValue) Category(org.junit.experimental.categories.Category) Test(org.junit.Test)

Example 19 with ServiceManager

use of io.cdap.cdap.test.ServiceManager in project cdap by cdapio.

the class TestFrameworkTestRun method testAppWithServices.

@Category(SlowTests.class)
@Test
public void testAppWithServices() throws Exception {
    ApplicationManager applicationManager = deployApplication(AppWithServices.class);
    LOG.info("Deployed.");
    ServiceManager serviceManager = applicationManager.getServiceManager(AppWithServices.SERVICE_NAME).start();
    serviceManager.waitForRun(ProgramRunStatus.RUNNING, 10, TimeUnit.SECONDS);
    LOG.info("Service Started");
    URL serviceURL = serviceManager.getServiceURL(15, TimeUnit.SECONDS);
    Assert.assertNotNull(serviceURL);
    // Call the ping endpoint
    URL url = new URL(serviceURL, "ping2");
    HttpRequest request = HttpRequest.get(url).build();
    HttpResponse response = executeHttp(request);
    Assert.assertEquals(200, response.getResponseCode());
    // Call the failure endpoint
    url = new URL(serviceURL, "failure");
    request = HttpRequest.get(url).build();
    response = executeHttp(request);
    Assert.assertEquals(500, response.getResponseCode());
    Assert.assertTrue(response.getResponseBodyAsString().contains("Exception"));
    // Call the verify ClassLoader endpoint
    url = new URL(serviceURL, "verifyClassLoader");
    request = HttpRequest.get(url).build();
    response = executeHttp(request);
    Assert.assertEquals(200, response.getResponseCode());
    RuntimeMetrics serviceMetrics = serviceManager.getMetrics();
    serviceMetrics.waitForinput(3, 5, TimeUnit.SECONDS);
    Assert.assertEquals(3, serviceMetrics.getInput());
    Assert.assertEquals(2, serviceMetrics.getProcessed());
    Assert.assertEquals(1, serviceMetrics.getException());
    // in the AppWithServices the handlerName is same as the serviceName - "ServerService" handler
    RuntimeMetrics handlerMetrics = getMetricsManager().getServiceHandlerMetrics(NamespaceId.DEFAULT.getNamespace(), AppWithServices.APP_NAME, AppWithServices.SERVICE_NAME, AppWithServices.SERVICE_NAME);
    handlerMetrics.waitForinput(3, 5, TimeUnit.SECONDS);
    Assert.assertEquals(3, handlerMetrics.getInput());
    Assert.assertEquals(2, handlerMetrics.getProcessed());
    Assert.assertEquals(1, handlerMetrics.getException());
    // we can verify metrics, by adding getServiceMetrics in MetricsManager and then disabling the system scope test in
    // TestMetricsCollectionService
    LOG.info("DatasetUpdateService Started");
    Map<String, String> args = ImmutableMap.of(AppWithServices.WRITE_VALUE_RUN_KEY, AppWithServices.DATASET_TEST_VALUE, AppWithServices.WRITE_VALUE_STOP_KEY, AppWithServices.DATASET_TEST_VALUE_STOP);
    ServiceManager datasetWorkerServiceManager = applicationManager.getServiceManager(AppWithServices.DATASET_WORKER_SERVICE_NAME).start(args);
    WorkerManager datasetWorker = applicationManager.getWorkerManager(AppWithServices.DATASET_UPDATE_WORKER).start(args);
    datasetWorker.waitForRun(ProgramRunStatus.RUNNING, 10, TimeUnit.SECONDS);
    datasetWorkerServiceManager.waitForRun(ProgramRunStatus.RUNNING, 10, TimeUnit.SECONDS);
    ServiceManager noopManager = applicationManager.getServiceManager("NoOpService").start();
    noopManager.waitForRun(ProgramRunStatus.RUNNING, 10, TimeUnit.SECONDS);
    // We don't know when the datasetWorker run() method executed, hence need to retry on the service call
    // until it can get a value from a dataset, which was written out by the datasetWorker.
    AtomicInteger called = new AtomicInteger(0);
    AtomicInteger failed = new AtomicInteger(0);
    Tasks.waitFor(AppWithServices.DATASET_TEST_VALUE, new Callable<String>() {

        @Override
        public String call() throws Exception {
            URL url = noopManager.getServiceURL();
            String path = "ping/" + AppWithServices.DATASET_TEST_KEY;
            try {
                called.incrementAndGet();
                return new Gson().fromJson(callServiceGet(url, path), String.class);
            } catch (IOException e) {
                failed.incrementAndGet();
                LOG.debug("Exception when reading from service {}/{}", url, path, e);
            }
            return null;
        }
    }, 30, TimeUnit.SECONDS);
    // Validates the metrics emitted by the service call.
    handlerMetrics = getMetricsManager().getServiceHandlerMetrics(NamespaceId.DEFAULT.getNamespace(), AppWithServices.APP_NAME, "NoOpService", "NoOpHandler");
    handlerMetrics.waitForinput(called.get(), 5, TimeUnit.SECONDS);
    handlerMetrics.waitForProcessed(1, 5, TimeUnit.SECONDS);
    handlerMetrics.waitForException(failed.get(), 5, TimeUnit.SECONDS);
    // Test that a service can discover another service
    String path = String.format("discover/%s/%s", AppWithServices.APP_NAME, AppWithServices.DATASET_WORKER_SERVICE_NAME);
    url = new URL(serviceURL, path);
    request = HttpRequest.get(url).build();
    response = executeHttp(request);
    Assert.assertEquals(200, response.getResponseCode());
    datasetWorker.stop();
    datasetWorker.waitForStopped(10, TimeUnit.SECONDS);
    datasetWorkerServiceManager.stop();
    datasetWorkerServiceManager.waitForStopped(10, TimeUnit.SECONDS);
    LOG.info("DatasetUpdateService Stopped");
    serviceManager.stop();
    serviceManager.waitForStopped(10, TimeUnit.SECONDS);
    LOG.info("ServerService Stopped");
    // Since all worker are stopped, we can just hit the service to read the dataset. No retry needed.
    String result = callServiceGet(noopManager.getServiceURL(), "ping/" + AppWithServices.DATASET_TEST_KEY_STOP);
    String decodedResult = new Gson().fromJson(result, String.class);
    Assert.assertEquals(AppWithServices.DATASET_TEST_VALUE_STOP, decodedResult);
    result = callServiceGet(noopManager.getServiceURL(), "ping/" + AppWithServices.DATASET_TEST_KEY_STOP_2);
    decodedResult = new Gson().fromJson(result, String.class);
    Assert.assertEquals(AppWithServices.DATASET_TEST_VALUE_STOP_2, decodedResult);
}
Also used : HttpRequest(io.cdap.common.http.HttpRequest) ApplicationManager(io.cdap.cdap.test.ApplicationManager) RuntimeMetrics(io.cdap.cdap.api.metrics.RuntimeMetrics) HttpResponse(io.cdap.common.http.HttpResponse) Gson(com.google.gson.Gson) IOException(java.io.IOException) URL(java.net.URL) IOException(java.io.IOException) ConflictException(io.cdap.cdap.common.ConflictException) WorkerManager(io.cdap.cdap.test.WorkerManager) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) ServiceManager(io.cdap.cdap.test.ServiceManager) Category(org.junit.experimental.categories.Category) Test(org.junit.Test)

Example 20 with ServiceManager

use of io.cdap.cdap.test.ServiceManager in project cdap by cdapio.

the class TestFrameworkTestRun method testServiceManager.

@Test
public void testServiceManager() throws Exception {
    ApplicationManager applicationManager = deployApplication(AppWithServices.class);
    final ServiceManager serviceManager = applicationManager.getServiceManager(AppWithServices.SERVICE_NAME);
    serviceManager.setInstances(2);
    Assert.assertEquals(0, serviceManager.getProvisionedInstances());
    Assert.assertEquals(2, serviceManager.getRequestedInstances());
    Assert.assertFalse(serviceManager.isRunning());
    List<RunRecord> history = serviceManager.getHistory();
    Assert.assertEquals(0, history.size());
    serviceManager.start();
    serviceManager.waitForRun(ProgramRunStatus.RUNNING, 10, TimeUnit.SECONDS);
    Assert.assertEquals(2, serviceManager.getProvisionedInstances());
    // requesting with ProgramRunStatus.KILLED returns empty list
    history = serviceManager.getHistory(ProgramRunStatus.KILLED);
    Assert.assertEquals(0, history.size());
    // requesting with either RUNNING or ALL will return one record
    Tasks.waitFor(1, new Callable<Integer>() {

        @Override
        public Integer call() throws Exception {
            return serviceManager.getHistory(ProgramRunStatus.RUNNING).size();
        }
    }, 5, TimeUnit.SECONDS);
    history = serviceManager.getHistory(ProgramRunStatus.RUNNING);
    Assert.assertEquals(ProgramRunStatus.RUNNING, history.get(0).getStatus());
    history = serviceManager.getHistory(ProgramRunStatus.ALL);
    Assert.assertEquals(1, history.size());
    Assert.assertEquals(ProgramRunStatus.RUNNING, history.get(0).getStatus());
}
Also used : AtomicInteger(java.util.concurrent.atomic.AtomicInteger) RunRecord(io.cdap.cdap.proto.RunRecord) ApplicationManager(io.cdap.cdap.test.ApplicationManager) ServiceManager(io.cdap.cdap.test.ServiceManager) IOException(java.io.IOException) ConflictException(io.cdap.cdap.common.ConflictException) Test(org.junit.Test)

Aggregations

ServiceManager (io.cdap.cdap.test.ServiceManager)52 ApplicationManager (io.cdap.cdap.test.ApplicationManager)48 Test (org.junit.Test)44 URL (java.net.URL)28 KeyValueTable (io.cdap.cdap.api.dataset.lib.KeyValueTable)22 Gson (com.google.gson.Gson)16 Category (org.junit.experimental.categories.Category)16 HttpResponse (io.cdap.common.http.HttpResponse)14 ApplicationId (io.cdap.cdap.proto.id.ApplicationId)12 PartitionedFileSet (io.cdap.cdap.api.dataset.lib.PartitionedFileSet)10 ArtifactId (io.cdap.cdap.proto.id.ArtifactId)10 WorkflowManager (io.cdap.cdap.test.WorkflowManager)10 HttpRequest (io.cdap.common.http.HttpRequest)10 IOException (java.io.IOException)10 FileSet (io.cdap.cdap.api.dataset.lib.FileSet)8 WorkerManager (io.cdap.cdap.test.WorkerManager)8 Set (java.util.Set)8 Table (io.cdap.cdap.api.dataset.table.Table)7 ImmutableSet (com.google.common.collect.ImmutableSet)6 ArtifactSummary (io.cdap.cdap.api.artifact.ArtifactSummary)6