This is an automated email from the ASF dual-hosted git repository.
richox pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/auron.git
The following commit(s) were added to refs/heads/master by this push:
new 14650863 [AURON #1755] Use test-specific Log4j2 config in Maven test
runs (#1756)
14650863 is described below
commit 14650863820dccccb857c26191b5d89c1b0aa210
Author: Thomas <[email protected]>
AuthorDate: Tue Dec 16 00:44:01 2025 +0800
[AURON #1755] Use test-specific Log4j2 config in Maven test runs (#1756)
<!--
- Start the PR title with the related issue ID, e.g. '[AURON #XXXX]
Short summary...'.
-->
# Which issue does this PR close?
Closes #1755
# Rationale for this change
# What changes are included in this PR?
- Add
-Dlog4j.configurationFile=file:src/test/resources/log4j2.properties to
surefire/scalatest
- Write file logs to target/unit-tests.log; reduce console noise (WARN)
# Are there any user-facing changes?
# How was this patch tested?
---
.github/workflows/tpcds-reusable.yml | 9 ++++--
auron-core/src/test/resources/log4j2.properties | 36 ++++++++++++++++++++++
common/src/test/resources/log4j2.properties | 36 ++++++++++++++++++++++
pom.xml | 2 ++
.../src/test/resources/log4j2.properties | 36 ++++++++++++++++++++++
.../src/test/resources/log4j2.properties | 36 ++++++++++++++++++++++
6 files changed, 153 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/tpcds-reusable.yml
b/.github/workflows/tpcds-reusable.yml
index a70de6cd..7617b9d2 100644
--- a/.github/workflows/tpcds-reusable.yml
+++ b/.github/workflows/tpcds-reusable.yml
@@ -190,9 +190,14 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
- name: unit-tests-${{ inputs.sparkver }}_${{ inputs.scalaver
}}-jdk-${{ inputs.javaver }}${{ inputs.celebornver && format('-{0}',
inputs.celebornver) || '' }}${{ inputs.unifflever && format('-{0}',
inputs.unifflever) || '' }}
+ name: unit-tests-reports-${{ inputs.sparkver }}_${{ inputs.scalaver
}}-jdk-${{ inputs.javaver }}${{ inputs.celebornver && format('-{0}',
inputs.celebornver) || '' }}${{ inputs.unifflever && format('-{0}',
inputs.unifflever) || '' }}
path: "**/target/surefire-reports/*.xml"
-
+ - name: Upload unit tests log
+ if: failure()
+ uses: actions/upload-artifact@v4
+ with:
+ name: unit-tests-logs-${{ inputs.sparkver }}_${{ inputs.scalaver
}}-jdk-${{ inputs.javaver }}${{ inputs.celebornver && format('-{0}',
inputs.celebornver) || '' }}${{ inputs.unifflever && format('-{0}',
inputs.unifflever) || '' }}
+ path: "**/target/unit-tests.log"
- name: Upload auron (Spark ${{ inputs.sparkver }}, Scala ${{
inputs.scalaver }}, JDK ${{ inputs.javaver }})
uses: actions/upload-artifact@v4
with:
diff --git a/auron-core/src/test/resources/log4j2.properties
b/auron-core/src/test/resources/log4j2.properties
new file mode 100644
index 00000000..8dc5160b
--- /dev/null
+++ b/auron-core/src/test/resources/log4j2.properties
@@ -0,0 +1,36 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+rootLogger.level = info
+rootLogger.appenderRef.file.ref = File
+
+#File Appender
+appender.file.type = File
+appender.file.name = File
+appender.file.fileName = target/unit-tests.log
+appender.file.layout.type = PatternLayout
+appender.file.layout.pattern = %d{HH:mm:ss.SSS} %t %p %c{1}: %m%n%ex
+
+#Console Appender
+appender.console.type = Console
+appender.console.name = STDOUT
+appender.console.target = SYSTEM_OUT
+appender.console.layout.type = PatternLayout
+appender.console.layout.pattern = %d{HH:mm:ss.SSS} %p %c:
%maxLen{%m}{512}%n%ex{8}%n
+appender.console.filter.threshold.type = ThresholdFilter
+appender.console.filter.threshold.level = warn
+
diff --git a/common/src/test/resources/log4j2.properties
b/common/src/test/resources/log4j2.properties
new file mode 100644
index 00000000..8dc5160b
--- /dev/null
+++ b/common/src/test/resources/log4j2.properties
@@ -0,0 +1,36 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+rootLogger.level = info
+rootLogger.appenderRef.file.ref = File
+
+#File Appender
+appender.file.type = File
+appender.file.name = File
+appender.file.fileName = target/unit-tests.log
+appender.file.layout.type = PatternLayout
+appender.file.layout.pattern = %d{HH:mm:ss.SSS} %t %p %c{1}: %m%n%ex
+
+#Console Appender
+appender.console.type = Console
+appender.console.name = STDOUT
+appender.console.target = SYSTEM_OUT
+appender.console.layout.type = PatternLayout
+appender.console.layout.pattern = %d{HH:mm:ss.SSS} %p %c:
%maxLen{%m}{512}%n%ex{8}%n
+appender.console.filter.threshold.type = ThresholdFilter
+appender.console.filter.threshold.level = warn
+
diff --git a/pom.xml b/pom.xml
index 7a05fdf3..f7ed0dfc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -344,6 +344,7 @@
<argLine>${extraJavaTestArgs}</argLine>
<environmentVariables />
<systemPropertyVariables>
+
<log4j.configurationFile>file:src/test/resources/log4j2.properties</log4j.configurationFile>
<java.io.tmpdir>${project.build.directory}/tmp</java.io.tmpdir>
<spark.driver.memory>1g</spark.driver.memory>
</systemPropertyVariables>
@@ -362,6 +363,7 @@
<argLine>${extraJavaTestArgs}</argLine>
<environmentVariables />
<systemProperties>
+
<log4j.configurationFile>file:src/test/resources/log4j2.properties</log4j.configurationFile>
<java.io.tmpdir>${project.build.directory}/tmp</java.io.tmpdir>
<spark.driver.memory>1g</spark.driver.memory>
</systemProperties>
diff --git a/spark-extension-shims-spark/src/test/resources/log4j2.properties
b/spark-extension-shims-spark/src/test/resources/log4j2.properties
new file mode 100644
index 00000000..8dc5160b
--- /dev/null
+++ b/spark-extension-shims-spark/src/test/resources/log4j2.properties
@@ -0,0 +1,36 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+rootLogger.level = info
+rootLogger.appenderRef.file.ref = File
+
+#File Appender
+appender.file.type = File
+appender.file.name = File
+appender.file.fileName = target/unit-tests.log
+appender.file.layout.type = PatternLayout
+appender.file.layout.pattern = %d{HH:mm:ss.SSS} %t %p %c{1}: %m%n%ex
+
+#Console Appender
+appender.console.type = Console
+appender.console.name = STDOUT
+appender.console.target = SYSTEM_OUT
+appender.console.layout.type = PatternLayout
+appender.console.layout.pattern = %d{HH:mm:ss.SSS} %p %c:
%maxLen{%m}{512}%n%ex{8}%n
+appender.console.filter.threshold.type = ThresholdFilter
+appender.console.filter.threshold.level = warn
+
diff --git a/spark-extension/src/test/resources/log4j2.properties
b/spark-extension/src/test/resources/log4j2.properties
new file mode 100644
index 00000000..8dc5160b
--- /dev/null
+++ b/spark-extension/src/test/resources/log4j2.properties
@@ -0,0 +1,36 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+rootLogger.level = info
+rootLogger.appenderRef.file.ref = File
+
+#File Appender
+appender.file.type = File
+appender.file.name = File
+appender.file.fileName = target/unit-tests.log
+appender.file.layout.type = PatternLayout
+appender.file.layout.pattern = %d{HH:mm:ss.SSS} %t %p %c{1}: %m%n%ex
+
+#Console Appender
+appender.console.type = Console
+appender.console.name = STDOUT
+appender.console.target = SYSTEM_OUT
+appender.console.layout.type = PatternLayout
+appender.console.layout.pattern = %d{HH:mm:ss.SSS} %p %c:
%maxLen{%m}{512}%n%ex{8}%n
+appender.console.filter.threshold.type = ThresholdFilter
+appender.console.filter.threshold.level = warn
+