diff --git a/functions/pom.xml b/functions/pom.xml new file mode 100644 index 0000000..4be71a0 --- /dev/null +++ b/functions/pom.xml @@ -0,0 +1,36 @@ + + + + + 4.0.0 + + + com.datasqrl.flinkrunner + flink-sql-runner-parent + 1.0.0-SNAPSHOT + + + functions + pom + + + system-functions-discovery + + + diff --git a/system-functions-discovery/pom.xml b/functions/system-functions-discovery/pom.xml similarity index 95% rename from system-functions-discovery/pom.xml rename to functions/system-functions-discovery/pom.xml index 3ccb4c9..1278c9d 100644 --- a/system-functions-discovery/pom.xml +++ b/functions/system-functions-discovery/pom.xml @@ -21,7 +21,7 @@ com.datasqrl.flinkrunner - flink-sql-runner-parent + functions 1.0.0-SNAPSHOT diff --git a/system-functions-discovery/src/main/java/com/datasqrl/function/AutoRegisterSystemFunction.java b/functions/system-functions-discovery/src/main/java/com/datasqrl/function/AutoRegisterSystemFunction.java similarity index 100% rename from system-functions-discovery/src/main/java/com/datasqrl/function/AutoRegisterSystemFunction.java rename to functions/system-functions-discovery/src/main/java/com/datasqrl/function/AutoRegisterSystemFunction.java diff --git a/pom.xml b/pom.xml index 55d5c6c..636494a 100644 --- a/pom.xml +++ b/pom.xml @@ -50,8 +50,8 @@ - system-functions-discovery - helpers + functions + testing flink-sql-runner @@ -121,6 +121,31 @@ + + + + org.projectlombok + lombok + ${lombok.version} + provided + + + org.junit.platform + junit-platform-launcher + test + + + org.junit.vintage + junit-vintage-engine + test + + + org.junit.jupiter + junit-jupiter-engine + test + + + @@ -259,6 +284,22 @@ + + + org.jacoco + jacoco-maven-plugin + 0.8.11 + + + + prepare-agent + prepare-agent-integration + report + report-integration + + + + @@ -428,4 +469,5 @@ + diff --git a/testing/coverage/pom.xml b/testing/coverage/pom.xml new file mode 100644 index 0000000..e52f3dc --- /dev/null +++ b/testing/coverage/pom.xml @@ -0,0 +1,68 @@ + + + + 4.0.0 + + com.datasqrl.flinkrunner + testing + 1.0.0-SNAPSHOT + + + flink-sql-runner-coverage + + JaCoCo can’t actually aggregate test reposts, so we have to jump through a bunch of hoops. This is hoop numero uno. + + + + ${project.groupId} + flink-sql-runner + ${project.version} + + + ${project.groupId} + system-functions-discovery + ${project.version} + + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.11 + + + report-aggregate + + report-aggregate + + verify + + + **/jacoco.exec + **/jacoco-it.exec + + + + + + + + diff --git a/testing/coverage/src/main/java/hoop/Code.java b/testing/coverage/src/main/java/hoop/Code.java new file mode 100644 index 0000000..827165f --- /dev/null +++ b/testing/coverage/src/main/java/hoop/Code.java @@ -0,0 +1,22 @@ +/* + * Copyright © 2024 DataSQRL (contact@datasqrl.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package hoop; + +/** + * JaCoCo can’t actually aggregate test reposts, so we have to jump through a bunch of hoops. This + * is hoop numero tres. + */ +public class Code {} diff --git a/testing/coverage/src/test/java/packagereport/ReportTest.java b/testing/coverage/src/test/java/packagereport/ReportTest.java new file mode 100644 index 0000000..e5951a9 --- /dev/null +++ b/testing/coverage/src/test/java/packagereport/ReportTest.java @@ -0,0 +1,28 @@ +/* + * Copyright © 2024 DataSQRL (contact@datasqrl.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package packagereport; + +import org.junit.Test; + +/** + * JaCoCo can’t actually aggregate test reposts, so we have to jump through a bunch of hoops. This + * is hoop numero dos. + */ +public class ReportTest { + + @Test + public void test() {} +} diff --git a/helpers/pom.xml b/testing/pom.xml similarity index 94% rename from helpers/pom.xml rename to testing/pom.xml index 2dcc8b7..d2160b3 100644 --- a/helpers/pom.xml +++ b/testing/pom.xml @@ -26,12 +26,13 @@ 1.0.0-SNAPSHOT - helpers + testing pom system-functions-sample udf-sample + coverage diff --git a/helpers/system-functions-sample/pom.xml b/testing/system-functions-sample/pom.xml similarity index 97% rename from helpers/system-functions-sample/pom.xml rename to testing/system-functions-sample/pom.xml index d3d64a2..d0b74c1 100644 --- a/helpers/system-functions-sample/pom.xml +++ b/testing/system-functions-sample/pom.xml @@ -21,7 +21,7 @@ com.datasqrl.flinkrunner - helpers + testing 1.0.0-SNAPSHOT diff --git a/helpers/system-functions-sample/src/main/java/sample/Upper.java b/testing/system-functions-sample/src/main/java/sample/Upper.java similarity index 100% rename from helpers/system-functions-sample/src/main/java/sample/Upper.java rename to testing/system-functions-sample/src/main/java/sample/Upper.java diff --git a/helpers/udf-sample/pom.xml b/testing/udf-sample/pom.xml similarity index 97% rename from helpers/udf-sample/pom.xml rename to testing/udf-sample/pom.xml index 4caf5a7..0f4b10d 100644 --- a/helpers/udf-sample/pom.xml +++ b/testing/udf-sample/pom.xml @@ -21,7 +21,7 @@ com.datasqrl.flinkrunner - helpers + testing 1.0.0-SNAPSHOT diff --git a/helpers/udf-sample/src/main/java/com/myudf/MyScalarFunction.java b/testing/udf-sample/src/main/java/com/myudf/MyScalarFunction.java similarity index 100% rename from helpers/udf-sample/src/main/java/com/myudf/MyScalarFunction.java rename to testing/udf-sample/src/main/java/com/myudf/MyScalarFunction.java