Less test stderr spam when running tests w/ java 11

patch by Robert Stupp; reviewed by Eduard Tudenhöfner for CASSANDRA-15780
This commit is contained in:
Robert Stupp 2020-04-01 17:08:55 +02:00
parent d3dadcd6f3
commit e394dc0bb3
3 changed files with 16 additions and 0 deletions

View File

@ -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());

View File

@ -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

View File

@ -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 = {