diff --git a/presto-main/src/test/java/io/prestosql/sql/planner/BenchmarkPlanner.java b/presto-main/src/test/java/io/prestosql/sql/planner/BenchmarkPlanner.java index 8485fb974d85..c6f20bdeae6d 100644 --- a/presto-main/src/test/java/io/prestosql/sql/planner/BenchmarkPlanner.java +++ b/presto-main/src/test/java/io/prestosql/sql/planner/BenchmarkPlanner.java @@ -38,6 +38,7 @@ import org.openjdk.jmh.runner.options.OptionsBuilder; import org.openjdk.jmh.runner.options.VerboseMode; import org.openjdk.jmh.runner.options.WarmupMode; +import org.testng.annotations.Test; import java.io.IOException; import java.net.URL; @@ -51,6 +52,7 @@ import static io.prestosql.sql.planner.LogicalPlanner.Stage.OPTIMIZED; import static io.prestosql.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; +import static org.testng.Assert.assertEquals; @SuppressWarnings("MethodMayBeStatic") @State(Scope.Benchmark) @@ -88,7 +90,7 @@ public void setup() queries = IntStream.rangeClosed(1, 22) .boxed() .filter(i -> i != 15) // q15 has two queries in it - .map(i -> readResource(format("/io/airlift/tpch/queries/q%d.sql", i))) + .map(i -> readResource(format("/io/prestosql/tpch/queries/q%d.sql", i))) .collect(toImmutableList()); } @@ -122,6 +124,15 @@ public List planQueries(BenchmarkData benchmarkData) }); } + @Test + public void verify() + { + BenchmarkData data = new BenchmarkData(); + data.setup(); + BenchmarkPlanner benchmark = new BenchmarkPlanner(); + assertEquals(benchmark.planQueries(data).size(), 21); + } + public static void main(String[] args) throws Exception {