diff --git a/buffer/src/test/java/io/netty/buffer/BigEndianUnsafeNoCleanerDirectByteBufTest.java b/buffer/src/test/java/io/netty/buffer/BigEndianUnsafeNoCleanerDirectByteBufTest.java index dc0ff6aa1b..0406c47cdb 100644 --- a/buffer/src/test/java/io/netty/buffer/BigEndianUnsafeNoCleanerDirectByteBufTest.java +++ b/buffer/src/test/java/io/netty/buffer/BigEndianUnsafeNoCleanerDirectByteBufTest.java @@ -24,7 +24,8 @@ public class BigEndianUnsafeNoCleanerDirectByteBufTest extends BigEndianDirectBy @Before public void checkHasUnsafe() { - Assume.assumeTrue("sun.misc.Unsafe not found, skip tests", PlatformDependent.hasUnsafe()); + Assume.assumeTrue("java.nio.DirectByteBuffer.(long, int) not found, skip tests", + PlatformDependent.useDirectBufferNoCleaner()); } @Override diff --git a/buffer/src/test/java/io/netty/buffer/LittleEndianUnsafeNoCleanerDirectByteBufTest.java b/buffer/src/test/java/io/netty/buffer/LittleEndianUnsafeNoCleanerDirectByteBufTest.java index ef9043a763..3a4b0c43da 100644 --- a/buffer/src/test/java/io/netty/buffer/LittleEndianUnsafeNoCleanerDirectByteBufTest.java +++ b/buffer/src/test/java/io/netty/buffer/LittleEndianUnsafeNoCleanerDirectByteBufTest.java @@ -23,7 +23,8 @@ public class LittleEndianUnsafeNoCleanerDirectByteBufTest extends LittleEndianDi @Before public void checkHasUnsafe() { - Assume.assumeTrue("sun.misc.Unsafe not found, skip tests", PlatformDependent.hasUnsafe()); + Assume.assumeTrue("java.nio.DirectByteBuffer.(long, int) not found, skip tests", + PlatformDependent.useDirectBufferNoCleaner()); } @Override