Search in sources :

Example 1 with TestExecutor

use of org.apache.asterix.test.common.TestExecutor in project asterixdb by apache.

the class SampleLocalClusterIT method test1_sanityQuery.

@Test
public void test1_sanityQuery() throws Exception {
    TestExecutor testExecutor = new TestExecutor();
    InputStream resultStream = testExecutor.executeQuery("1+1", OutputFormat.ADM, new URI("http", null, "127.0.0.1", 19002, Servlets.AQL_QUERY, null, null), Collections.emptyList());
    StringWriter sw = new StringWriter();
    IOUtils.copy(resultStream, sw);
    Assert.assertEquals("2", sw.toString().trim());
}
Also used : TestExecutor(org.apache.asterix.test.common.TestExecutor) StringWriter(java.io.StringWriter) InputStream(java.io.InputStream) URI(java.net.URI) Test(org.junit.Test)

Aggregations

InputStream (java.io.InputStream)1 StringWriter (java.io.StringWriter)1 URI (java.net.URI)1 TestExecutor (org.apache.asterix.test.common.TestExecutor)1 Test (org.junit.Test)1