You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2025/11/05 06:37:01 UTC
(kudu) branch master updated (60f5e5267 -> dc11e1c0c)
This is an automated email from the ASF dual-hosted git repository.
alexey pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
from 60f5e5267 KUDU-1261 make ArrayCellMetadataView::Init() more robust
new ae8498e8a [java] log information on random seed in DEBUG level
new dc11e1c0c [java] log test scenario name in TestKuduClient
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../java/org/apache/kudu/client/TestKuduClient.java | 18 ++++++++++++++++++
.../main/java/org/apache/kudu/test/RandomUtils.java | 2 +-
2 files changed, 19 insertions(+), 1 deletion(-)
(kudu) 02/02: [java] log test scenario name in TestKuduClient
Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
commit dc11e1c0c9b35f6563bb6f6df35e5d45738db705
Author: Alexey Serbin <al...@apache.org>
AuthorDate: Fri Oct 31 17:53:42 2025 -0700
[java] log test scenario name in TestKuduClient
While trying to decipher logs from failing TestKuduClient in dist-test,
I found it's hard to tell what exact scenario had failed. To address
the issue, this changelist adds the necessary information similar to
what gtest outputs when running C++ tests.
I thought it would be great to do this for all the Java tests, but I
couldn't find a straightforward way to achieve this with JUnit4 if not
copying over the whole TestWatcher boilerplate. Even if that would be
quite a ubiquitous Java-style approach, I'm not ready to do so.
Instead, I think this boilerplate can be added on a test-by-test basis,
when we find it's necessary: the majority of the tests aren't flaky
as of today, and running tests with Gradle's 'test' task allows for
per-scenario reporting already.
Meanwhile, with JUnit5 the Extension concept [2] has been introduced,
and it allows for having the necessary functionality by adding the
@ExtendWith directive instead of copying the whole TestWatcher-related
boilerplate. An upgrade to JUnit6 (or newer) might be an opportunity
to revisit this, if necessary.
[1] https://junit.org/junit4/javadoc/latest/org/junit/rules/TestWatcher.html
[2] https://docs.junit.org/current/api/org.junit.jupiter.api/org/junit/jupiter/api/extension/Extension.html
Change-Id: I6f4d0e9bf5b590f5f0ce490838658091063e2aea
Reviewed-on: http://gerrit.cloudera.org:8080/23616
Tested-by: Alexey Serbin <al...@apache.org>
Reviewed-by: Abhishek Chennaka <ac...@cloudera.com>
---
.../java/org/apache/kudu/client/TestKuduClient.java | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduClient.java b/java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduClient.java
index 4cb829584..85bab61a5 100644
--- a/java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduClient.java
+++ b/java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduClient.java
@@ -81,6 +81,9 @@ import io.netty.util.Timeout;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
+import org.junit.rules.TestRule;
+import org.junit.rules.TestWatcher;
+import org.junit.runner.Description;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -115,6 +118,21 @@ public class TestKuduClient {
@Rule
public KuduTestHarness harness = new KuduTestHarness();
+ @Rule(order = Integer.MIN_VALUE)
+ public TestRule watcher = new TestWatcher() {
+ protected void starting(Description description) {
+ System.out.println("[ TEST: STARTING ] " + description.getMethodName());
+ }
+
+ protected void succeeded(Description description) {
+ System.out.println("[ TEST: SUCCEEDED ] " + description.getMethodName());
+ }
+
+ protected void failed(Throwable e, Description description) {
+ System.out.println("[ TEST: FAILED ] " + description.getMethodName());
+ }
+ };
+
@Before
public void setUp() {
client = harness.getClient();
(kudu) 01/02: [java] log information on random seed in DEBUG level
Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
commit ae8498e8a7fa8d034c8e607fe729119740c6bce5
Author: Alexey Serbin <al...@apache.org>
AuthorDate: Mon Nov 3 13:23:25 2025 -0800
[java] log information on random seed in DEBUG level
Outputting information on the random utilities seed isn't something
needed in day-to-day test runs, so this patch changes the log level
for the information from INFO to DEBUG.
There are no functional modifications in this changelist.
Change-Id: I972d2fe59b65ecfa6c433dc782cd6c000485b470
Reviewed-on: http://gerrit.cloudera.org:8080/23621
Tested-by: Alexey Serbin <al...@apache.org>
Reviewed-by: Abhishek Chennaka <ac...@cloudera.com>
---
.../kudu-test-utils/src/main/java/org/apache/kudu/test/RandomUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/java/kudu-test-utils/src/main/java/org/apache/kudu/test/RandomUtils.java b/java/kudu-test-utils/src/main/java/org/apache/kudu/test/RandomUtils.java
index 48885392f..d8684d961 100644
--- a/java/kudu-test-utils/src/main/java/org/apache/kudu/test/RandomUtils.java
+++ b/java/kudu-test-utils/src/main/java/org/apache/kudu/test/RandomUtils.java
@@ -46,7 +46,7 @@ public class RandomUtils {
LOG.info("System property {} is defined. Overriding random seed: {}",
TEST_RANDOM_SEED_PROP, seed);
}
- LOG.info("Using random seed: {}", seed);
+ LOG.debug("Using random seed: {}", seed);
return new Random(seed);
}