You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by ch...@apache.org on 2022/10/20 04:12:23 UTC
[dolphinscheduler] branch dev updated: [Improvement][Style] Update spotless junit4 check scope (#12450)
This is an automated email from the ASF dual-hosted git repository.
chufenggao pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new 0a6e8af864 [Improvement][Style] Update spotless junit4 check scope (#12450)
0a6e8af864 is described below
commit 0a6e8af864423dac2aff279bf56f6f1ee95e95b9
Author: Eric Gao <er...@gmail.com>
AuthorDate: Thu Oct 20 12:12:17 2022 +0800
[Improvement][Style] Update spotless junit4 check scope (#12450)
---
.../microbench/base/AbstractBaseBenchmark.java | 15 ++++++++++++---
pom.xml | 6 ------
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/dolphinscheduler-microbench/src/main/java/org/apache/dolphinscheduler/microbench/base/AbstractBaseBenchmark.java b/dolphinscheduler-microbench/src/main/java/org/apache/dolphinscheduler/microbench/base/AbstractBaseBenchmark.java
index 3fc0b67ef7..0b958345ce 100644
--- a/dolphinscheduler-microbench/src/main/java/org/apache/dolphinscheduler/microbench/base/AbstractBaseBenchmark.java
+++ b/dolphinscheduler-microbench/src/main/java/org/apache/dolphinscheduler/microbench/base/AbstractBaseBenchmark.java
@@ -117,8 +117,17 @@ public abstract class AbstractBaseBenchmark {
}
private static int getForks() {
- String value = System.getProperty("forkCount");
- return null != value ? Integer.parseInt(value) : -1;
- }
+ String forkCount = System.getProperty("forkCount");
+ if (forkCount == null) {
+ return -1;
+ }
+ try {
+ return Integer.parseInt(forkCount);
+ } catch (NumberFormatException e) {
+ logger.error("fail to convert forkCount into int", e);
+ }
+
+ return -1;
+ }
}
diff --git a/pom.xml b/pom.xml
index 87f5b5e723..192cd3f567 100644
--- a/pom.xml
+++ b/pom.xml
@@ -640,11 +640,6 @@
<version>${spotless.version}</version>
<configuration>
<java>
- <!--TODO: Remove the following excludes section when junit4 removed from e2e and microbench module-->
- <excludes>
- <exclude>**/e2e/**/*.java</exclude>
- <exclude>**/microbench/**/*.java</exclude>
- </excludes>
<eclipse>
<file>style/spotless_dolphinscheduler_formatter.xml</file>
</eclipse>
@@ -693,7 +688,6 @@
<include>docs/**/*.md</include>
</includes>
<excludes>
- <!--Avoid conflicts with formatting tools in some special modules-->
<exclude>**/.github/**/*.md</exclude>
</excludes>
<flexmark />