Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitsultana committed Oct 20, 2024
1 parent e581709 commit fe93f8c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@


public class QueryExecutorTest {
private static final String AVRO_DATA_PATH = "data/sampleEatsData.avro";
private static final String AVRO_DATA_PATH = "data/sampleEatsData30k.avro";
private static final String EMPTY_JSON_DATA_PATH = "data/test_empty_data.json";
private static final String QUERY_EXECUTOR_CONFIG_PATH = "conf/query-executor.properties";
private static final File TEMP_DIR = new File(FileUtils.getTempDirectory(), "QueryExecutorTest");
Expand Down Expand Up @@ -182,7 +182,7 @@ public void testCountQuery() {
instanceRequest.setSearchSegments(_segmentNames);
InstanceResponseBlock instanceResponse = _queryExecutor.execute(getQueryRequest(instanceRequest), QUERY_RUNNERS);
assertTrue(instanceResponse.getResultsBlock() instanceof AggregationResultsBlock);
assertEquals(((AggregationResultsBlock) instanceResponse.getResultsBlock()).getResults().get(0), 20000L);
assertEquals(((AggregationResultsBlock) instanceResponse.getResultsBlock()).getResults().get(0), 60000L);
}

@Test
Expand All @@ -192,7 +192,7 @@ public void testSumQuery() {
instanceRequest.setSearchSegments(_segmentNames);
InstanceResponseBlock instanceResponse = _queryExecutor.execute(getQueryRequest(instanceRequest), QUERY_RUNNERS);
assertTrue(instanceResponse.getResultsBlock() instanceof AggregationResultsBlock);
assertEquals(((AggregationResultsBlock) instanceResponse.getResultsBlock()).getResults().get(0), 40102.0);
assertEquals(((AggregationResultsBlock) instanceResponse.getResultsBlock()).getResults().get(0), 120306.0);
}

@Test
Expand All @@ -202,7 +202,7 @@ public void testMaxQuery() {
instanceRequest.setSearchSegments(_segmentNames);
InstanceResponseBlock instanceResponse = _queryExecutor.execute(getQueryRequest(instanceRequest), QUERY_RUNNERS);
assertTrue(instanceResponse.getResultsBlock() instanceof AggregationResultsBlock);
assertEquals(((AggregationResultsBlock) instanceResponse.getResultsBlock()).getResults().get(0), 999.0);
assertEquals(((AggregationResultsBlock) instanceResponse.getResultsBlock()).getResults().get(0), 2997.0);
}

@Test
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit fe93f8c

Please sign in to comment.