From 41cc4708bea0d0aac87dd1ad2bb701c2f156255c Mon Sep 17 00:00:00 2001 From: Santiago Pericasgeertsen Date: Thu, 27 Jan 2022 14:00:46 -0500 Subject: [PATCH 1/5] Special treatment for ParamConverterProviders. They are now all registered in the shared injection manager when more than one application is present. This ensures they are all properly installed; otherwise, Jersey will only consider those known after the first of the applications is registered. Signed-off-by: Santiago Pericasgeertsen --- .../microprofile/server/JaxRsApplication.java | 28 +++++++++ .../server/JaxRsCdiExtension.java | 16 +++-- .../server/ServerCdiExtension.java | 13 ++++ .../param-converter-provider/pom.xml | 63 +++++++++++++++++++ .../paramconverterprovider/Application1.java | 30 +++++++++ .../paramconverterprovider/Application2.java | 30 +++++++++ .../ParamConverterAnnotation.java | 30 +++++++++ .../ParamConverterProvider1.java | 45 +++++++++++++ .../ParamConverterProvider2.java | 46 ++++++++++++++ .../paramconverterprovider/Resource1.java | 30 +++++++++ .../paramconverterprovider/Resource2.java | 30 +++++++++ .../paramconverterprovider/TestCollector.java | 28 +++++++++ .../src/main/resources/META-INF/beans.xml | 25 ++++++++ .../src/main/resources/logging.properties | 36 +++++++++++ .../paramconverterprovider/MainTest.java | 33 ++++++++++ tests/functional/pom.xml | 1 + 16 files changed, 475 insertions(+), 9 deletions(-) create mode 100644 tests/functional/param-converter-provider/pom.xml create mode 100644 tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/Application1.java create mode 100644 tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/Application2.java create mode 100644 tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/ParamConverterAnnotation.java create mode 100644 tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/ParamConverterProvider1.java create mode 100644 tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/ParamConverterProvider2.java create mode 100644 tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/Resource1.java create mode 100644 tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/Resource2.java create mode 100644 tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/TestCollector.java create mode 100644 tests/functional/param-converter-provider/src/main/resources/META-INF/beans.xml create mode 100644 tests/functional/param-converter-provider/src/main/resources/logging.properties create mode 100644 tests/functional/param-converter-provider/src/test/java/io/helidon/tests/functional/paramconverterprovider/MainTest.java diff --git a/microprofile/server/src/main/java/io/helidon/microprofile/server/JaxRsApplication.java b/microprofile/server/src/main/java/io/helidon/microprofile/server/JaxRsApplication.java index 622510a7fa8..b2de5ff6bc5 100644 --- a/microprofile/server/src/main/java/io/helidon/microprofile/server/JaxRsApplication.java +++ b/microprofile/server/src/main/java/io/helidon/microprofile/server/JaxRsApplication.java @@ -16,7 +16,9 @@ package io.helidon.microprofile.server; +import java.util.Collections; import java.util.Optional; +import java.util.Set; import java.util.concurrent.ExecutorService; import javax.ws.rs.ApplicationPath; @@ -43,6 +45,7 @@ public final class JaxRsApplication { private final boolean routingNameRequired; private final Class appClass; private final boolean synthetic; + private final Set> providers; /** * Create a new instance based on an JAX-RS Application class. @@ -87,6 +90,7 @@ private JaxRsApplication(Builder builder) { this.appName = builder.appName; this.appClass = builder.appClass; this.synthetic = builder.synthetic; + this.providers = builder.providers; } @Override @@ -145,6 +149,16 @@ public Optional> applicationClass() { return Optional.ofNullable(appClass); } + /** + * List of all providers found by scanning the {@code @Provider} annotation. This list + * will be identical for all application subclasses. + * + * @return list of providers + */ + Set> providers() { + return providers; + } + /** * Fluent API builder to create {@link JaxRsApplication} instances. */ @@ -158,6 +172,8 @@ public static class Builder { private String routingName; private boolean routingNameRequired; private boolean synthetic = false; + private Set> providers = Collections.emptySet(); + /** * Configure an explicit context root for this application. @@ -281,6 +297,18 @@ public Builder routingNameRequired(boolean routingNameRequired) { return this; } + /** + * Configure a set of providers for this application. This set is typically the + * same for all applications. + * + * @param providers set of providers + * @return updated builder instance + */ + public Builder providers(Set> providers) { + this.providers = providers; + return this; + } + Builder synthetic(boolean synthetic) { this.synthetic = synthetic; return this; diff --git a/microprofile/server/src/main/java/io/helidon/microprofile/server/JaxRsCdiExtension.java b/microprofile/server/src/main/java/io/helidon/microprofile/server/JaxRsCdiExtension.java index 858617971c2..354fd4717a0 100644 --- a/microprofile/server/src/main/java/io/helidon/microprofile/server/JaxRsCdiExtension.java +++ b/microprofile/server/src/main/java/io/helidon/microprofile/server/JaxRsCdiExtension.java @@ -133,6 +133,7 @@ public List applicationsToRun() throws IllegalStateException { .map(appClass -> JaxRsApplication.builder() .applicationClass(appClass) .config(ResourceConfig.forApplicationClass(appClass, allClasses)) + .providers(providers) .build()) .collect(Collectors.toList())); @@ -276,15 +277,12 @@ JerseySupport toJerseySupport(Supplier defaultExecuto JerseySupport.Builder builder = JerseySupport.builder(jaxRsApplication.resourceConfig()); builder.config(((io.helidon.config.Config) ConfigProvider.getConfig()).get("server.jersey")); builder.executorService(jaxRsApplication.executorService().orElseGet(defaultExecutorService)); - builder.register(new ExceptionMapper() { - @Override - public Response toResponse(Exception exception) { - if (exception instanceof WebApplicationException) { - return ((WebApplicationException) exception).getResponse(); - } else { - LOGGER.log(Level.WARNING, exception, () -> "Internal server error"); - return Response.serverError().build(); - } + builder.register((ExceptionMapper) exception -> { + if (exception instanceof WebApplicationException) { + return ((WebApplicationException) exception).getResponse(); + } else { + LOGGER.log(Level.WARNING, exception, () -> "Internal server error"); + return Response.serverError().build(); } }); builder.injectionManager(injectionManager); diff --git a/microprofile/server/src/main/java/io/helidon/microprofile/server/ServerCdiExtension.java b/microprofile/server/src/main/java/io/helidon/microprofile/server/ServerCdiExtension.java index 6f83738966c..b1f11fa0c1d 100644 --- a/microprofile/server/src/main/java/io/helidon/microprofile/server/ServerCdiExtension.java +++ b/microprofile/server/src/main/java/io/helidon/microprofile/server/ServerCdiExtension.java @@ -51,6 +51,7 @@ import javax.enterprise.inject.spi.ProcessManagedBean; import javax.enterprise.inject.spi.ProcessProducerField; import javax.enterprise.inject.spi.ProcessProducerMethod; +import javax.ws.rs.ext.ParamConverterProvider; import io.helidon.common.Prioritized; import io.helidon.common.configurable.ServerThreadPoolSupplier; @@ -66,6 +67,7 @@ import io.helidon.webserver.staticcontent.StaticContentSupport; import org.eclipse.microprofile.config.ConfigProvider; +import org.glassfish.jersey.internal.inject.Bindings; import org.glassfish.jersey.internal.inject.InjectionManager; import org.glassfish.jersey.internal.inject.Injections; @@ -233,6 +235,17 @@ private void registerJaxRsApplications(BeanManager beanManager) { boolean singleManager = config.get("server.single-injection-manager").asBoolean().asOptional().orElse(false); InjectionManager shared = jaxRsApplications.size() == 1 || singleManager ? null : Injections.createInjectionManager(); + + // If multiple apps, register all ParamConverterProvider's in shared manager to prevent + // only those associated with the first application to be installed by Jersey + if (shared != null) { + JaxRsApplication anyApp = jaxRsApplications.iterator().next(); + anyApp.providers().stream() + .filter(ParamConverterProvider.class::isAssignableFrom) + .forEach(c -> shared.register(Bindings.serviceAsContract(c).to(ParamConverterProvider.class))); + } + + // Add all applications jaxRsApplications.forEach(it -> addApplication(jaxRs, it, shared)); } STARTUP_LOGGER.finest("Registered jersey application(s)"); diff --git a/tests/functional/param-converter-provider/pom.xml b/tests/functional/param-converter-provider/pom.xml new file mode 100644 index 00000000000..00e7733f547 --- /dev/null +++ b/tests/functional/param-converter-provider/pom.xml @@ -0,0 +1,63 @@ + + + + + 4.0.0 + + helidon-tests-functional-project + io.helidon.tests.functional + 2.4.2-SNAPSHOT + + + helidon-tests-param-converter-provider + Helidon Functional Test: ParamConverterProviders and injection managers + + + + io.helidon.microprofile.bundles + helidon-microprofile + + + org.jboss + jandex + runtime + true + + + org.junit.jupiter + junit-jupiter-api + test + + + org.hamcrest + hamcrest-all + test + + + org.junit.jupiter + junit-jupiter-params + test + + + io.helidon.microprofile.tests + helidon-microprofile-tests-junit5 + test + + + \ No newline at end of file diff --git a/tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/Application1.java b/tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/Application1.java new file mode 100644 index 00000000000..3ba5d4fdc4e --- /dev/null +++ b/tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/Application1.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2022 Oracle and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.helidon.tests.functional.paramconverterprovider; + +import javax.enterprise.context.ApplicationScoped; +import javax.ws.rs.core.Application; +import java.util.Set; + +@ApplicationScoped +public class Application1 extends Application { + + @Override + public Set> getClasses() { + return Set.of(Resource1.class, ParamConverterProvider1.class); + } +} diff --git a/tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/Application2.java b/tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/Application2.java new file mode 100644 index 00000000000..90770399c6e --- /dev/null +++ b/tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/Application2.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2022 Oracle and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.helidon.tests.functional.paramconverterprovider; + +import javax.enterprise.context.ApplicationScoped; +import javax.ws.rs.core.Application; +import java.util.Set; + +@ApplicationScoped +public class Application2 extends Application { + + @Override + public Set> getClasses() { + return Set.of(Resource2.class, ParamConverterProvider2.class); + } +} diff --git a/tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/ParamConverterAnnotation.java b/tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/ParamConverterAnnotation.java new file mode 100644 index 00000000000..bed3d916846 --- /dev/null +++ b/tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/ParamConverterAnnotation.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2022 Oracle and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.helidon.tests.functional.paramconverterprovider; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target({java.lang.annotation.ElementType.PARAMETER, + java.lang.annotation.ElementType.METHOD, + java.lang.annotation.ElementType.FIELD}) +@Retention(RetentionPolicy.RUNTIME) +public @interface ParamConverterAnnotation { + + String value(); +} diff --git a/tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/ParamConverterProvider1.java b/tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/ParamConverterProvider1.java new file mode 100644 index 00000000000..7fdc933481a --- /dev/null +++ b/tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/ParamConverterProvider1.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2022 Oracle and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.helidon.tests.functional.paramconverterprovider; + +import javax.ws.rs.ext.ParamConverter; +import javax.ws.rs.ext.ParamConverterProvider; +import javax.ws.rs.ext.Provider; +import java.lang.annotation.Annotation; +import java.lang.reflect.Type; + +@Provider +public class ParamConverterProvider1 implements ParamConverterProvider { + + public ParamConverterProvider1() { + TestCollector.PARAM_CONVERTER_PROVIDERS.add(getClass()); + } + + public ParamConverter getConverter(Class rawType, Type genericType, Annotation[] annotations) { + return new ParamConverter() { + @Override + public T fromString(String value) { + return null; + } + + @Override + public String toString(T value) { + return null; + } + }; + } +} diff --git a/tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/ParamConverterProvider2.java b/tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/ParamConverterProvider2.java new file mode 100644 index 00000000000..22dfdaf7054 --- /dev/null +++ b/tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/ParamConverterProvider2.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2022 Oracle and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.helidon.tests.functional.paramconverterprovider; + +import javax.ws.rs.ext.ParamConverter; +import javax.ws.rs.ext.ParamConverterProvider; +import javax.ws.rs.ext.Provider; +import java.lang.annotation.Annotation; +import java.lang.reflect.Type; + +@Provider +public class ParamConverterProvider2 implements ParamConverterProvider { + + public ParamConverterProvider2() { + TestCollector.PARAM_CONVERTER_PROVIDERS.add(getClass()); + } + + @Override + public ParamConverter getConverter(Class rawType, Type genericType, Annotation[] annotations) { + return new ParamConverter() { + @Override + public T fromString(String value) { + return null; + } + + @Override + public String toString(T value) { + return null; + } + }; + } +} diff --git a/tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/Resource1.java b/tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/Resource1.java new file mode 100644 index 00000000000..7c42e000b36 --- /dev/null +++ b/tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/Resource1.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2022 Oracle and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.helidon.tests.functional.paramconverterprovider; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.QueryParam; + +@Path("hello1") +public class Resource1 { + + @GET + public String get(@QueryParam("foo") @ParamConverterAnnotation("bar") String s) { + return "hello"; + } +} diff --git a/tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/Resource2.java b/tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/Resource2.java new file mode 100644 index 00000000000..fbf8373fb31 --- /dev/null +++ b/tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/Resource2.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2022 Oracle and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.helidon.tests.functional.paramconverterprovider; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.QueryParam; + +@Path("hello2") +public class Resource2 { + + @GET + public String get(@QueryParam("foo") @ParamConverterAnnotation("bar") String s) { + return "hello"; + } +} diff --git a/tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/TestCollector.java b/tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/TestCollector.java new file mode 100644 index 00000000000..0604a2a353a --- /dev/null +++ b/tests/functional/param-converter-provider/src/main/java/io/helidon/tests/functional/paramconverterprovider/TestCollector.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2022 Oracle and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.helidon.tests.functional.paramconverterprovider; + +import javax.enterprise.context.ApplicationScoped; +import java.util.Set; +import java.util.concurrent.CopyOnWriteArraySet; + +@ApplicationScoped +public class TestCollector { + + static Set> PARAM_CONVERTER_PROVIDERS = new CopyOnWriteArraySet<>(); + +} diff --git a/tests/functional/param-converter-provider/src/main/resources/META-INF/beans.xml b/tests/functional/param-converter-provider/src/main/resources/META-INF/beans.xml new file mode 100644 index 00000000000..d01419886fa --- /dev/null +++ b/tests/functional/param-converter-provider/src/main/resources/META-INF/beans.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/tests/functional/param-converter-provider/src/main/resources/logging.properties b/tests/functional/param-converter-provider/src/main/resources/logging.properties new file mode 100644 index 00000000000..351c4e65b87 --- /dev/null +++ b/tests/functional/param-converter-provider/src/main/resources/logging.properties @@ -0,0 +1,36 @@ +# +# Copyright (c) 2022 Oracle and/or its affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Send messages to the console +handlers=io.helidon.common.HelidonConsoleHandler + +# HelidonConsoleHandler uses a SimpleFormatter subclass that replaces "!thread!" with the current thread +java.util.logging.SimpleFormatter.format=%1$tY.%1$tm.%1$td %1$tH:%1$tM:%1$tS %4$s %3$s !thread!: %5$s%6$s%n + +# Global logging level. Can be overridden by specific loggers +.level=INFO + +# Quiet Weld +org.jboss.level=WARNING + +# Component specific log levels +#io.helidon.webserver.level=INFO +#io.helidon.config.level=INFO +#io.helidon.security.level=INFO +#io.helidon.common.level=INFO +#io.netty.level=INFO + +#io.helidon.webserver.jersey.level=FINEST \ No newline at end of file diff --git a/tests/functional/param-converter-provider/src/test/java/io/helidon/tests/functional/paramconverterprovider/MainTest.java b/tests/functional/param-converter-provider/src/test/java/io/helidon/tests/functional/paramconverterprovider/MainTest.java new file mode 100644 index 00000000000..c33583ebafa --- /dev/null +++ b/tests/functional/param-converter-provider/src/test/java/io/helidon/tests/functional/paramconverterprovider/MainTest.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2022 Oracle and/or its affiliates. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.helidon.tests.functional.paramconverterprovider; + +import io.helidon.microprofile.tests.junit5.HelidonTest; +import org.junit.jupiter.api.Test; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.containsInAnyOrder; + +@HelidonTest +class MainTest { + + @Test + void testHello() { + assertThat(TestCollector.PARAM_CONVERTER_PROVIDERS, + containsInAnyOrder(ParamConverterProvider1.class, ParamConverterProvider2.class)); + } +} \ No newline at end of file diff --git a/tests/functional/pom.xml b/tests/functional/pom.xml index 7b2abda23b1..077381bf6d1 100644 --- a/tests/functional/pom.xml +++ b/tests/functional/pom.xml @@ -43,5 +43,6 @@ request-scope request-scope-cdi jax-rs-multiple-apps + param-converter-provider From 19e99991f4442691e9c9ff68a88cba329b5ee6ca Mon Sep 17 00:00:00 2001 From: Santiago Pericasgeertsen Date: Thu, 27 Jan 2022 14:47:25 -0500 Subject: [PATCH 2/5] Updated copyright year. Signed-off-by: Santiago Pericasgeertsen --- tests/functional/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/pom.xml b/tests/functional/pom.xml index 077381bf6d1..eb2cc53f2f7 100644 --- a/tests/functional/pom.xml +++ b/tests/functional/pom.xml @@ -1,7 +1,7 @@