From 0e4825a71f1ca73e8c800fc1fcbf2ed40fc42592 Mon Sep 17 00:00:00 2001 From: Janne Valkealahti Date: Sat, 5 Mar 2022 09:42:15 +0000 Subject: [PATCH] Disable some jcommander tests on jre17 - For now to think about how things should work on 17 --- .../shell/jcommander/JCommanderParameterResolverTest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spring-shell-jcommander-adapter/src/test/java/org/springframework/shell/jcommander/JCommanderParameterResolverTest.java b/spring-shell-jcommander-adapter/src/test/java/org/springframework/shell/jcommander/JCommanderParameterResolverTest.java index 2189e041..e2e5dace 100644 --- a/spring-shell-jcommander-adapter/src/test/java/org/springframework/shell/jcommander/JCommanderParameterResolverTest.java +++ b/spring-shell-jcommander-adapter/src/test/java/org/springframework/shell/jcommander/JCommanderParameterResolverTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 the original author or authors. + * Copyright 2015-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.springframework.shell.jcommander; import java.lang.reflect.Method; @@ -22,6 +21,8 @@ import java.util.Collections; import java.util.stream.Stream; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledOnJre; +import org.junit.jupiter.api.condition.JRE; import org.springframework.core.MethodParameter; import org.springframework.shell.CompletionContext; @@ -47,11 +48,13 @@ public class JCommanderParameterResolverTest { private JCommanderParameterResolver resolver = new JCommanderParameterResolver(); @Test + @DisabledOnJre({JRE.JAVA_17}) public void testSupportsJCommanderPojos() throws Exception { assertThat(resolver.supports(Utils.createMethodParameter(COMMAND_METHOD, 0))).isEqualTo(true); } @Test + @DisabledOnJre({JRE.JAVA_17}) public void testDoesNotSupportsNonJCommanderPojos() throws Exception { Method method = ReflectionUtils.findMethod(MyLordCommands.class, "apocalypse", String.class);