This is an automated email from the ASF dual-hosted git repository.
lizhanhui pushed a commit to branch bazel
in repository https://gitbox.apache.org/repos/asf/rocketmq.git
The following commit(s) were added to refs/heads/bazel by this push:
new 3840c3d33 Fix test label (#4876)
3840c3d33 is described below
commit 3840c3d33e98160ddaa1b8014780a680873419f7
Author: Zhanhui Li <[email protected]>
AuthorDate: Wed Aug 24 00:57:00 2022 +0800
Fix test label (#4876)
* Make test portable to Windows
* Fix label issues
---
client/BUILD.bazel | 1 -
controller/BUILD.bazel | 3 +++
.../controller/impl/controller/impl/DLedgerControllerTest.java | 5 +++--
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/client/BUILD.bazel b/client/BUILD.bazel
index c30be20ea..c5c57cac0 100644
--- a/client/BUILD.bazel
+++ b/client/BUILD.bazel
@@ -61,6 +61,5 @@ GenTestRules(
],
medium_tests = [
"src/test/java/org/apache/rocketmq/client/consumer/DefaultLitePullConsumerTest",
-
"src/test/java/org/apache/rocketmq/controller/impl/controller/impl/DLedgerControllerTest",
],
)
diff --git a/controller/BUILD.bazel b/controller/BUILD.bazel
index 66f209e32..0e1cc9169 100644
--- a/controller/BUILD.bazel
+++ b/controller/BUILD.bazel
@@ -70,4 +70,7 @@ GenTestRules(
deps = [
":tests",
],
+ medium_tests = [
+
"src/test/java/org/apache/rocketmq/controller/impl/controller/impl/DLedgerControllerTest",
+ ],
)
diff --git
a/controller/src/test/java/org/apache/rocketmq/controller/impl/controller/impl/DLedgerControllerTest.java
b/controller/src/test/java/org/apache/rocketmq/controller/impl/controller/impl/DLedgerControllerTest.java
index dce3167ef..11d89ef6e 100644
---
a/controller/src/test/java/org/apache/rocketmq/controller/impl/controller/impl/DLedgerControllerTest.java
+++
b/controller/src/test/java/org/apache/rocketmq/controller/impl/controller/impl/DLedgerControllerTest.java
@@ -54,8 +54,9 @@ public class DLedgerControllerTest {
private List<String> baseDirs;
private List<DLedgerController> controllers;
- public DLedgerController launchController(final String group, final String
peers, final String selfId, String storeType, final boolean
isEnableElectUncleanMaster) {
- final String path = "/tmp" + File.separator + group + File.separator +
selfId;
+ public DLedgerController launchController(final String group, final String
peers, final String selfId,
+ String storeType, final boolean isEnableElectUncleanMaster) {
+ final String path = System.getProperty("java.io.tmpdir") +
File.separator + group + File.separator + selfId;
baseDirs.add(path);
final ControllerConfig config = new ControllerConfig();