Skip to content

Commit 7cfeb8b

Browse files
authored
chore: Upload crash logs if Java tests fail (#1779)
1 parent 969c013 commit 7cfeb8b

File tree

3 files changed

+151
-323
lines changed

3 files changed

+151
-323
lines changed

.github/actions/java-test/action.yaml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,27 @@ runs:
5454
- name: Run tests
5555
shell: bash
5656
run: |
57-
SPARK_HOME=`pwd` ./mvnw -B clean install ${{ inputs.maven_opts }}
58-
57+
MAVEN_OPTS="-XX:+UnlockDiagnosticVMOptions -XX:+ShowMessageBoxOnError -XX:+HeapDumpOnOutOfMemoryError -XX:ErrorFile=./hs_err_pid%p.log" SPARK_HOME=`pwd` ./mvnw -B clean install ${{ inputs.maven_opts }}
58+
- name: Upload crash logs
59+
if: failure()
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: crash-logs-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}
63+
path: "**/hs_err_pid*.log"
64+
- name: Debug listing
65+
if: failure()
66+
shell: bash
67+
run: |
68+
echo "CWD: $(pwd)"
69+
ls -lah .
70+
ls -lah target
71+
find . -name 'unit-tests.log'
72+
- name: Upload unit-tests.log
73+
if: failure()
74+
uses: actions/upload-artifact@v4
75+
with:
76+
name: unit-tests-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}
77+
path: "**/target/unit-tests.log"
5978
- name: Upload test results
6079
if: ${{ inputs.upload-test-reports == 'true' }}
6180
uses: actions/upload-artifact@v4

spark/src/test/scala/org/apache/comet/CometArrayExpressionSuite.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -410,22 +410,21 @@ class CometArrayExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelp
410410
}
411411
}
412412

413-
ignore("array_repeat") {
413+
test("array_repeat") {
414414
withSQLConf(
415415
CometConf.COMET_EXPR_ALLOW_INCOMPATIBLE.key -> "true",
416416
CometConf.COMET_EXPLAIN_FALLBACK_ENABLED.key -> "true") {
417417
Seq(true, false).foreach { dictionaryEnabled =>
418418
withTempDir { dir =>
419419
val path = new Path(dir.toURI.toString, "test.parquet")
420-
makeParquetFileAllTypes(path, dictionaryEnabled, 10000)
420+
makeParquetFileAllTypes(path, dictionaryEnabled, 100)
421421
spark.read.parquet(path.toString).createOrReplaceTempView("t1")
422422

423423
checkSparkAnswerAndOperator(sql("SELECT array_repeat(_4, null) from t1"))
424424
checkSparkAnswerAndOperator(sql("SELECT array_repeat(_4, 0) from t1"))
425425
checkSparkAnswerAndOperator(
426426
sql("SELECT array_repeat(_2, 5) from t1 where _2 is not null"))
427427
checkSparkAnswerAndOperator(sql("SELECT array_repeat(_2, 5) from t1 where _2 is null"))
428-
checkSparkAnswerAndOperator(sql("SELECT array_repeat(_3, _4) from t1 where _3 is null"))
429428
checkSparkAnswerAndOperator(
430429
sql("SELECT array_repeat(_3, _4) from t1 where _3 is not null"))
431430
checkSparkAnswerAndOperator(sql("SELECT array_repeat(cast(_3 as string), 2) from t1"))

0 commit comments

Comments
 (0)