use of org.opentest4j.TestAbortedException in project spring-security by spring-projects.
the class CryptoAssumptions method assumeAes256.
private static void assumeAes256(CipherAlgorithm cipherAlgorithm) {
boolean aes256Available = false;
try {
Cipher.getInstance(cipherAlgorithm.toString());
aes256Available = Cipher.getMaxAllowedKeyLength("AES") >= 256;
} catch (NoSuchAlgorithmException ex) {
throw new TestAbortedException(cipherAlgorithm + " not available, skipping test", ex);
} catch (NoSuchPaddingException ex) {
throw new TestAbortedException(cipherAlgorithm + " padding not available, skipping test", ex);
}
Assumptions.assumeTrue(aes256Available, "AES key length of 256 not allowed, skipping test");
}
use of org.opentest4j.TestAbortedException in project netty by netty.
the class EpollSocketChannelConfigTest method testInvalidLowTcpNotSentLowAt.
@Test
public void testInvalidLowTcpNotSentLowAt() {
try {
final long value = -1;
ch.config().setTcpNotSentLowAt(value);
} catch (IllegalArgumentException e) {
return;
} catch (RuntimeException e) {
throw new TestAbortedException("assumeNoException", e);
}
fail();
}
use of org.opentest4j.TestAbortedException in project netty by netty.
the class EpollSocketChannelConfigTest method testInvalidHighTcpNotSentLowAt.
@Test
public void testInvalidHighTcpNotSentLowAt() {
try {
final long value = 0xFFFFFFFFL + 1;
ch.config().setTcpNotSentLowAt(value);
} catch (IllegalArgumentException e) {
return;
} catch (RuntimeException e) {
throw new TestAbortedException("assumeNoException", e);
}
fail();
}
use of org.opentest4j.TestAbortedException in project netty by netty.
the class KQueueSocketChannelConfigTest method testRandomSndLowAt.
@Test
public void testRandomSndLowAt() {
final int expected = Math.min(BSD_SND_LOW_AT_MAX, Math.abs(rand.nextInt()));
final int actual;
try {
ch.config().setSndLowAt(expected);
actual = ch.config().getSndLowAt();
} catch (RuntimeException e) {
throw new TestAbortedException("assumeNoException", e);
}
assertEquals(expected, actual);
}
use of org.opentest4j.TestAbortedException in project spock by spockframework.
the class PendingFeatureBaseInterceptor method testAborted.
protected TestAbortedException testAborted(StackTraceElement[] stackTrace) {
TestAbortedException testAbortedException = new TestAbortedException("Feature not yet implemented correctly." + ("".equals(reason) ? "" : " Reason: " + reason));
testAbortedException.setStackTrace(stackTrace);
return testAbortedException;
}
Aggregations