Fix Assume.assumeTrue(...) checks in *UnssafeNoCleanerDirectByteBufTest
Motivation: We used incorrect assumeTrue(...) checks. Modifications: Fix check. Result: Be able to run tests also if java.nio.DirectByteBuffer.<init>(long, int) could not be accessed.
This commit is contained in:
parent
9fef4ba1bf
commit
65dea8aeec
@ -24,7 +24,8 @@ public class BigEndianUnsafeNoCleanerDirectByteBufTest extends BigEndianDirectBy
|
|||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void checkHasUnsafe() {
|
public void checkHasUnsafe() {
|
||||||
Assume.assumeTrue("sun.misc.Unsafe not found, skip tests", PlatformDependent.hasUnsafe());
|
Assume.assumeTrue("java.nio.DirectByteBuffer.<init>(long, int) not found, skip tests",
|
||||||
|
PlatformDependent.useDirectBufferNoCleaner());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -23,7 +23,8 @@ public class LittleEndianUnsafeNoCleanerDirectByteBufTest extends LittleEndianDi
|
|||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void checkHasUnsafe() {
|
public void checkHasUnsafe() {
|
||||||
Assume.assumeTrue("sun.misc.Unsafe not found, skip tests", PlatformDependent.hasUnsafe());
|
Assume.assumeTrue("java.nio.DirectByteBuffer.<init>(long, int) not found, skip tests",
|
||||||
|
PlatformDependent.useDirectBufferNoCleaner());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user