From 2fb86fddfc8a00579c7af906b25e69fcb00b9289 Mon Sep 17 00:00:00 2001 From: Chance Zibolski Date: Mon, 28 Oct 2019 12:24:39 -0700 Subject: [PATCH 1/4] test.sh: mvn test presto-tests Updates test.sh to run presto-tests modules tests --- test.sh | 49 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/test.sh b/test.sh index 0976f0bd4212b..0cd4094aab2db 100755 --- a/test.sh +++ b/test.sh @@ -1,5 +1,50 @@ #!/bin/bash set -x +set -e -# TODO: real tests -./mvnw -v +ARTIFACT_DIR="${ARTIFACT_DIR:-}" + +TEST_SPECIFIC_MODULES=${TEST_SPECIFIC_MODULES:-presto-tests} +JVM_HEAPSIZE="${JVM_HEAPSIZE:-2048M}" + +export MAVEN_OPTS="-Xmx$JVM_HEAPSIZE -XX:+ExitOnOutOfMemoryError" +MAVEN_SKIP_CHECKS_AND_DOCS="-Dair.check.skip-all=true -Dmaven.javadoc.skip=true" +MAVEN_FAST_INSTALL="-DskipTests $MAVEN_SKIP_CHECKS_AND_DOCS -B -q -T C1" + +function cleanup() { + exit_status=$? + # copy artifacts to $ARTIFACT_DIR if specified + # --no-perms/--no-group to handle running as unprivileged in prow + if [ -n "$ARTIFACT_DIR" ]; then + mkdir -p "$ARTIFACT_DIR" + rsync -v -rl -m \ + --include='**/' \ + --include='**/surefire-reports/**.xml' \ + --include='**/surefire-reports/emailable-report.html' \ + --include='**/product-tests-presto-jvm-error-file.log' \ + --include='**/test-reports/junitreports/**.xml' \ + --include='**/test-reports/emailable-report.html' \ + --exclude='*' \ + . "$ARTIFACT_DIR/" + fi + exit "$exit_status" +} + +function run_tests() { + ./mvnw -v + ./mvnw clean -B + ./mvnw install $MAVEN_FAST_INSTALL -B -pl "${TEST_SPECIFIC_MODULES}" -am + ./mvnw test $MAVEN_SKIP_CHECKS_AND_DOCS -B -pl "${TEST_SPECIFIC_MODULES}" -Dair.test.jvmsize=$JVM_HEAPSIZE +} + +function main() { + if [ -n "$ARTIFACT_DIR" ]; then + mkdir -p "$ARTIFACT_DIR" + run_tests | tee "$ARTIFACT_DIR/maven-logs.txt" + else + run_tests + fi +} + +trap cleanup EXIT +main From f967e7ea76f7cf00a9aed7e5892880a6a9488772 Mon Sep 17 00:00:00 2001 From: Chance Zibolski Date: Tue, 29 Oct 2019 07:11:20 -0700 Subject: [PATCH 2/4] test.sh: Skip TestDbSessionPropertyManagerIntegration test It starts mysqld which we don't have --- test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.sh b/test.sh index 0cd4094aab2db..a4a60b0350468 100755 --- a/test.sh +++ b/test.sh @@ -34,7 +34,7 @@ function run_tests() { ./mvnw -v ./mvnw clean -B ./mvnw install $MAVEN_FAST_INSTALL -B -pl "${TEST_SPECIFIC_MODULES}" -am - ./mvnw test $MAVEN_SKIP_CHECKS_AND_DOCS -B -pl "${TEST_SPECIFIC_MODULES}" -Dair.test.jvmsize=$JVM_HEAPSIZE + ./mvnw test $MAVEN_SKIP_CHECKS_AND_DOCS -B -pl "${TEST_SPECIFIC_MODULES}" -Dair.test.jvmsize=$JVM_HEAPSIZE -Dtest="!io.prestosql.execution.sessionpropertymanagers.TestDbSessionPropertyManagerIntegration" } function main() { From 68fd67e9eedd3463fb40c4d1d4c99e2fa80c1562 Mon Sep 17 00:00:00 2001 From: Martin Traverso Date: Tue, 29 Oct 2019 16:20:50 -0700 Subject: [PATCH 3/4] Disable testLargeIn in plan determinism tester This test is inherently expensive. Running it multiple times causes build times to increased significantly. --- .../java/io/prestosql/tests/TestQueryPlanDeterminism.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/presto-tests/src/test/java/io/prestosql/tests/TestQueryPlanDeterminism.java b/presto-tests/src/test/java/io/prestosql/tests/TestQueryPlanDeterminism.java index 2b73590f9844e..708aeb2056895 100644 --- a/presto-tests/src/test/java/io/prestosql/tests/TestQueryPlanDeterminism.java +++ b/presto-tests/src/test/java/io/prestosql/tests/TestQueryPlanDeterminism.java @@ -23,6 +23,7 @@ import io.prestosql.testing.MaterializedResult; import io.prestosql.testing.TestingAccessControlManager; import org.intellij.lang.annotations.Language; +import org.testng.SkipException; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -269,4 +270,11 @@ public void testTpcdsQ6deterministic() " FROM lineitem j\n" + " )\n"); } + + @Override + public void testLargeIn() + { + // testLargeIn is expensive + throw new SkipException("Skipping testLargeIn"); + } } From 9574669d6c5d44c926531ce82a06a8d389529462 Mon Sep 17 00:00:00 2001 From: Chance Zibolski Date: Mon, 4 Nov 2019 14:41:14 -0800 Subject: [PATCH 4/4] test.sh: Adjust JVM memory, leave air.test.jvmsize --- test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test.sh b/test.sh index a4a60b0350468..c3eae3de3b6f3 100755 --- a/test.sh +++ b/test.sh @@ -5,7 +5,7 @@ set -e ARTIFACT_DIR="${ARTIFACT_DIR:-}" TEST_SPECIFIC_MODULES=${TEST_SPECIFIC_MODULES:-presto-tests} -JVM_HEAPSIZE="${JVM_HEAPSIZE:-2048M}" +JVM_HEAPSIZE="${JVM_HEAPSIZE:-4096M}" export MAVEN_OPTS="-Xmx$JVM_HEAPSIZE -XX:+ExitOnOutOfMemoryError" MAVEN_SKIP_CHECKS_AND_DOCS="-Dair.check.skip-all=true -Dmaven.javadoc.skip=true" @@ -34,7 +34,7 @@ function run_tests() { ./mvnw -v ./mvnw clean -B ./mvnw install $MAVEN_FAST_INSTALL -B -pl "${TEST_SPECIFIC_MODULES}" -am - ./mvnw test $MAVEN_SKIP_CHECKS_AND_DOCS -B -pl "${TEST_SPECIFIC_MODULES}" -Dair.test.jvmsize=$JVM_HEAPSIZE -Dtest="!io.prestosql.execution.sessionpropertymanagers.TestDbSessionPropertyManagerIntegration" + ./mvnw test $MAVEN_SKIP_CHECKS_AND_DOCS -B -pl "${TEST_SPECIFIC_MODULES}" -Dtest="!io.prestosql.execution.sessionpropertymanagers.TestDbSessionPropertyManagerIntegration" } function main() {