Search in sources :

Example 1 with Application

use of com.example.mydtapp.Application in project apex-core by apache.

the class ApplicationTest method testApplication.

@Test
public void testApplication() throws IOException, Exception {
    try {
        LocalMode lma = LocalMode.newInstance();
        Configuration conf = new Configuration(false);
        conf.addResource(this.getClass().getResourceAsStream("/META-INF/properties.xml"));
        lma.prepareDAG(new Application(), conf);
        LocalMode.Controller lc = lma.getController();
        // runs for 10 seconds and quits
        lc.run(10000);
    } catch (ConstraintViolationException e) {
        Assert.fail("constraint violations: " + e.getConstraintViolations());
    }
}
Also used : Configuration(org.apache.hadoop.conf.Configuration) LocalMode(com.datatorrent.api.LocalMode) ConstraintViolationException(javax.validation.ConstraintViolationException) Application(com.example.mydtapp.Application) Test(org.junit.Test)

Aggregations

LocalMode (com.datatorrent.api.LocalMode)1 Application (com.example.mydtapp.Application)1 ConstraintViolationException (javax.validation.ConstraintViolationException)1 Configuration (org.apache.hadoop.conf.Configuration)1 Test (org.junit.Test)1