Skip to content

Commit 9b3c372

Browse files
committed
Fix a minor flaw in test (missing fail())
1 parent c6ef574 commit 9b3c372

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/test/java/com/fasterxml/jackson/databind/jsontype/PolymorphicDeserSubtypeCheck5016Test.java

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import org.junit.jupiter.api.Test;
44

55
import com.fasterxml.jackson.annotation.JsonTypeInfo;
6+
67
import com.fasterxml.jackson.databind.MapperFeature;
78
import com.fasterxml.jackson.databind.ObjectMapper;
89
import com.fasterxml.jackson.databind.exc.InvalidDefinitionException;
@@ -12,6 +13,7 @@
1213

1314
import static org.junit.jupiter.api.Assertions.assertEquals;
1415
import static org.junit.jupiter.api.Assertions.assertThrows;
16+
import static org.junit.jupiter.api.Assertions.fail;
1517

1618
// https://github.com/FasterXML/jackson-databind/issues/5016
1719
public class PolymorphicDeserSubtypeCheck5016Test extends DatabindTestUtil
@@ -90,6 +92,7 @@ public void testBlockingOfRunnable() throws Exception {
9092
assertEquals(animalInfo.thisType.name, newInfo0.thisType.name);
9193
try {
9294
mapper.readValue(serialized, RunnableInfo.class);
95+
fail("Should not pass");
9396
} catch (InvalidDefinitionException e) {
9497
verifyException(e, "PolymorphicTypeValidator");
9598
verifyException(e, "denied resolution of all subtypes of base type `java.lang.Runnable`");

0 commit comments

Comments
 (0)