Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly stop wiremock after rest-client tcks #1939

Merged
merged 6 commits into from
Jun 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions jersey/common/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2020 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.
Expand All @@ -15,7 +15,7 @@
*/

/**
* Eclipse Microprofile Tracing implementation for helidon microprofile.
* Utilities for Jersey handling.
*/
module io.helidon.jersey.common {
requires java.logging;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/**
* Provider for Helidon WebClient {@link Connector} that utilizes the Helidon HTTP Client to send and receive
* HTTP request and responses.
* <p/>
* <p>
* The following properties are only supported at construction of this class:
* <ul>
* <li>{@link org.glassfish.jersey.client.ClientProperties#CONNECT_TIMEOUT}</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
import io.helidon.common.GenericType;
import io.helidon.common.http.DataChunk;
import io.helidon.common.http.MediaType;
import io.helidon.common.reactive.IoMulti;
import io.helidon.common.reactive.Multi;
import io.helidon.common.reactive.MultiFromOutputStream;
import io.helidon.common.reactive.OutputStreamMulti;
import io.helidon.common.reactive.Single;
import io.helidon.media.common.ContentWriters;
import io.helidon.media.common.MessageBodyWriter;
Expand Down Expand Up @@ -120,7 +121,7 @@ static CompletionStage<WebClientResponse> submit(HelidonEntityType type,
stage = requestBuilder.submit(channel);
break;
case OUTPUT_STREAM_MULTI:
final MultiFromOutputStream publisher = new MultiFromOutputStream() {};
final OutputStreamMulti publisher = IoMulti.outputStreamMulti();
requestContext.setStreamProvider(contentLength -> publisher);
executorService.execute((ProcessingRunnable) () -> {
requestContext.writeEntity();
Expand Down
32 changes: 32 additions & 0 deletions jersey/connector/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright (c) 2020 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.
*/

/**
* A {@link org.glassfish.jersey.client.spi.Connector} that utilizes the Helidon HTTP Client to send and receive
* * HTTP request and responses.
*/
module io.helidon.jersey.connector {
requires jersey.client;
requires jersey.common;
requires jakarta.activation;
requires java.logging;
requires java.ws.rs;
requires io.helidon.common.reactive;
requires io.helidon.webclient;
requires io.netty.codec.http;

exports io.helidon.jersey.connector;
}
15 changes: 14 additions & 1 deletion microprofile/tests/tck/tck-rest-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@
<artifactId>jakarta.xml.bind-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand All @@ -59,10 +64,11 @@
</configuration>
</plugin>
<plugin>
<groupId>uk.co.deliverymind</groupId>
<groupId>uk.co.automatictester</groupId>
<artifactId>wiremock-maven-plugin</artifactId>
<executions>
<execution>
<id>start</id>
<phase>test-compile</phase>
<goals>
<goal>run</goal>
Expand All @@ -72,6 +78,13 @@
<params>--port=8765</params>
</configuration>
</execution>
<execution>
<id>stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
<version.plugin.toolchains>1.1</version.plugin.toolchains>
<version.plugin.version-plugin>2.3</version.plugin.version-plugin>
<version.plugin.buildnumber>1.4</version.plugin.buildnumber>
<version.plugin.wiremock>2.7.0</version.plugin.wiremock>
<version.plugin.wiremock>2.14.0</version.plugin.wiremock>

<javadoc.link.jackson-annotations>https://fasterxml.github.io/jackson-annotations/javadoc/2.9/</javadoc.link.jackson-annotations>
<javadoc.link.jackson-core>https://fasterxml.github.io/jackson-core/javadoc/2.9/</javadoc.link.jackson-core>
Expand Down Expand Up @@ -590,7 +590,7 @@
<version>${version.plugin.archetype}</version>
</plugin>
<plugin>
<groupId>uk.co.deliverymind</groupId>
<groupId>uk.co.automatictester</groupId>
<artifactId>wiremock-maven-plugin</artifactId>
<version>${version.plugin.wiremock}</version>
</plugin>
Expand Down