You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sn...@apache.org on 2020/05/04 18:52:29 UTC

[cassandra] branch trunk updated: Less test stderr spam when running tests w/ java 11

This is an automated email from the ASF dual-hosted git repository.

snazy pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/trunk by this push:
     new e394dc0  Less test stderr spam when running tests w/ java 11
e394dc0 is described below

commit e394dc0bb32f612a476269010930c617dd1ed3cb
Author: Robert Stupp <sn...@snazy.de>
AuthorDate: Wed Apr 1 17:08:55 2020 +0200

    Less test stderr spam when running tests w/ java 11
    
    patch by Robert Stupp; reviewed by Eduard Tudenhöfner for CASSANDRA-15780
---
 src/java/org/apache/cassandra/utils/FBUtilities.java                | 5 +++++
 .../org/apache/cassandra/io/util/BufferedDataOutputStreamTest.java  | 5 +++++
 test/unit/org/apache/cassandra/tools/ToolsTester.java               | 6 ++++++
 3 files changed, 16 insertions(+)

diff --git a/src/java/org/apache/cassandra/utils/FBUtilities.java b/src/java/org/apache/cassandra/utils/FBUtilities.java
index 115cd43..9b39f2d 100644
--- a/src/java/org/apache/cassandra/utils/FBUtilities.java
+++ b/src/java/org/apache/cassandra/utils/FBUtilities.java
@@ -72,6 +72,11 @@ import org.apache.cassandra.net.AsyncOneResponse;
 
 public class FBUtilities
 {
+    static
+    {
+        preventIllegalAccessWarnings();
+    }
+
     private static final Logger logger = LoggerFactory.getLogger(FBUtilities.class);
 
     private static final ObjectMapper jsonMapper = new ObjectMapper(new JsonFactory());
diff --git a/test/unit/org/apache/cassandra/io/util/BufferedDataOutputStreamTest.java b/test/unit/org/apache/cassandra/io/util/BufferedDataOutputStreamTest.java
index 7c1a0da..c5c3b60 100644
--- a/test/unit/org/apache/cassandra/io/util/BufferedDataOutputStreamTest.java
+++ b/test/unit/org/apache/cassandra/io/util/BufferedDataOutputStreamTest.java
@@ -44,10 +44,15 @@ import com.google.common.primitives.UnsignedBytes;
 import com.google.common.primitives.UnsignedInteger;
 import com.google.common.primitives.UnsignedLong;
 
+import static org.apache.cassandra.utils.FBUtilities.preventIllegalAccessWarnings;
 import static org.junit.Assert.*;
 
 public class BufferedDataOutputStreamTest
 {
+    static
+    {
+        preventIllegalAccessWarnings();
+    }
 
     @Test(expected = BufferOverflowException.class)
     public void testDataOutputBufferFixedByes() throws Exception
diff --git a/test/unit/org/apache/cassandra/tools/ToolsTester.java b/test/unit/org/apache/cassandra/tools/ToolsTester.java
index 391c9b9..0bb9beb 100644
--- a/test/unit/org/apache/cassandra/tools/ToolsTester.java
+++ b/test/unit/org/apache/cassandra/tools/ToolsTester.java
@@ -39,6 +39,7 @@ import org.junit.BeforeClass;
 
 import org.slf4j.LoggerFactory;
 
+import static org.apache.cassandra.utils.FBUtilities.preventIllegalAccessWarnings;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
@@ -49,6 +50,11 @@ import static org.junit.Assert.fail;
  */
 public abstract class ToolsTester
 {
+    static
+    {
+        preventIllegalAccessWarnings();
+    }
+
     private static List<ThreadInfo> initialThreads;
 
     static final String[] EXPECTED_THREADS_WITH_SCHEMA = {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org