Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 34 additions & 0 deletions .github/workflows/ci-java-17-and-21.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Java CI

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 17, 21 ]
name: Java ${{ matrix.java }} build
steps:
- uses: actions/checkout@v4
- name: Prepare multi-module build
run: |
git submodule update --init --recursive
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: liberica
java-version: ${{ matrix.java }}
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: ./mvnw clean package -Dgpg.skip
- if: ${{ matrix.java != 8 }}
name: Check style with Spotless
run: ./mvnw spotless:check

File renamed without changes.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
.idea/
.vscode/
target/
bin/
.project
.classpath
.settings/
.factorypath
.gradle
.history
.history/
6 changes: 3 additions & 3 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 5 additions & 9 deletions cloudfoundry-client-reactor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@
<groupId>com.github.zafarkhaja</groupId>
<artifactId>java-semver</artifactId>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>mockwebserver</artifactId>
<scope>test</scope>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>mockwebserver3-junit5</artifactId>
<scope>test</scope>
<version>5.0.0-alpha.11</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
Expand Down Expand Up @@ -88,11 +89,6 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,12 @@
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.databind.deser.DeserializationProblemHandler;
import java.io.IOException;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import okhttp3.mockwebserver.Dispatcher;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import okhttp3.mockwebserver.RecordedRequest;
import org.junit.After;
import org.junit.ComparisonFailure;
import java.util.*;
import mockwebserver3.Dispatcher;
import mockwebserver3.MockResponse;
import mockwebserver3.MockWebServer;
import mockwebserver3.RecordedRequest;
import org.junit.jupiter.api.AfterEach;
import org.slf4j.bridge.SLF4JBridgeHandler;
import reactor.core.publisher.Mono;

Expand Down Expand Up @@ -68,12 +64,12 @@ protected AbstractRestTest() {
this.root = Mono.just(this.mockWebServer.url("/").uri().toString());
}

@After
@AfterEach
public final void shutdown() throws IOException {
this.mockWebServer.shutdown();
}

@After
@AfterEach
public final void verify() {
this.multipleRequestDispatcher.verify();
}
Expand Down Expand Up @@ -122,7 +118,7 @@ public MockResponse dispatch(RecordedRequest request) {
try {
interactionContext.getRequest().assertEquals(request);
return interactionContext.getResponse().getMockResponse();
} catch (ComparisonFailure e) {
} catch (AssertionError e) {
e.printStackTrace();
return new MockResponse().setResponseCode(400);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
import java.util.Collections;
import org.cloudfoundry.reactor.util.AbstractReactorOperations;
import org.cloudfoundry.reactor.util.Operator;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import reactor.core.publisher.Mono;
import reactor.test.StepVerifier;

public final class CustomRequestTagTest extends AbstractRestTest {
final class CustomRequestTagTest extends AbstractRestTest {

private static final String CUSTOM_REQUEST_TAG_NAME = "test-header";

Expand All @@ -41,7 +41,7 @@ public final class CustomRequestTagTest extends AbstractRestTest {
.build();

@Test
public void addCustomHttpHeader() {
void addCustomHttpHeader() {
mockRequest(
InteractionContext.builder()
.request(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
import java.net.InetSocketAddress;
import java.time.Duration;
import java.util.Optional;
import org.junit.After;
import org.junit.Test;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Test;
import reactor.netty.http.client.HttpClient;
import reactor.netty.transport.ProxyProvider;
import reactor.test.StepVerifier;

public final class DefaultConnectionContextTest extends AbstractRestTest {
final class DefaultConnectionContextTest extends AbstractRestTest {

private final DefaultConnectionContext connectionContext =
DefaultConnectionContext.builder()
Expand All @@ -40,13 +40,13 @@ public final class DefaultConnectionContextTest extends AbstractRestTest {
.secure(false)
.build();

@After
public void dispose() {
@AfterEach
void dispose() {
this.connectionContext.dispose();
}

@Test
public void getInfo() {
void getInfo() {
mockRequest(
InteractionContext.builder()
.request(TestRequest.builder().method(GET).path("/").build())
Expand Down Expand Up @@ -77,7 +77,7 @@ public void getInfo() {
}

@Test
public void multipleInstances() {
void multipleInstances() {
DefaultConnectionContext first =
DefaultConnectionContext.builder().apiHost("test-host").build();

Expand All @@ -92,7 +92,7 @@ public void multipleInstances() {
}

@Test
public void configurationAlwaysApplied() {
void configurationAlwaysApplied() {
DefaultConnectionContext ctx =
DefaultConnectionContext.builder()
.connectionPoolSize(24)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

import io.netty.handler.codec.http.HttpResponseStatus;
import java.time.Duration;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import reactor.test.StepVerifier;

public final class DelegatingRootProviderTest extends AbstractRestTest {
final class DelegatingRootProviderTest extends AbstractRestTest {

private final DelegatingRootProvider rootProvider =
DelegatingRootProvider.builder()
Expand All @@ -36,7 +36,7 @@ public final class DelegatingRootProviderTest extends AbstractRestTest {
.build();

@Test
public void getRoot() {
void getRoot() {
this.rootProvider
.getRoot(CONNECTION_CONTEXT)
.as(StepVerifier::create)
Expand All @@ -46,7 +46,7 @@ public void getRoot() {
}

@Test
public void getRootCloudFoundryClientV2() {
void getRootCloudFoundryClientV2() {
mockRequest(
InteractionContext.builder()
.request(TestRequest.builder().method(GET).path("/").build())
Expand All @@ -68,7 +68,7 @@ public void getRootCloudFoundryClientV2() {
}

@Test
public void getRootCloudFoundryClientV2Fallback() {
void getRootCloudFoundryClientV2Fallback() {
mockRequest(
InteractionContext.builder()
.request(TestRequest.builder().method(GET).path("/").build())
Expand All @@ -88,7 +88,7 @@ public void getRootCloudFoundryClientV2Fallback() {
}

@Test
public void getRootCloudFoundryClientV3() {
void getRootCloudFoundryClientV3() {
mockRequest(
InteractionContext.builder()
.request(TestRequest.builder().method(GET).path("/").build())
Expand All @@ -110,7 +110,7 @@ public void getRootCloudFoundryClientV3() {
}

@Test
public void getRootCloudFoundryClientV3Fallback() {
void getRootCloudFoundryClientV3Fallback() {
mockRequest(
InteractionContext.builder()
.request(TestRequest.builder().method(GET).path("/").build())
Expand All @@ -130,7 +130,7 @@ public void getRootCloudFoundryClientV3Fallback() {
}

@Test
public void getRootDopplerClient() {
void getRootDopplerClient() {
mockRequest(
InteractionContext.builder()
.request(TestRequest.builder().method(GET).path("/").build())
Expand All @@ -150,7 +150,7 @@ public void getRootDopplerClient() {
}

@Test
public void getRootDopplerClientFallback() {
void getRootDopplerClientFallback() {
mockRequest(
InteractionContext.builder()
.request(TestRequest.builder().method(GET).path("/").build())
Expand Down Expand Up @@ -180,7 +180,7 @@ public void getRootDopplerClientFallback() {
}

@Test
public void getRootKeyNoKey() {
void getRootKeyNoKey() {
mockRequest(
InteractionContext.builder()
.request(TestRequest.builder().method(GET).path("/").build())
Expand Down Expand Up @@ -209,7 +209,7 @@ public void getRootKeyNoKey() {
}

@Test
public void getRootKeyNoValue() {
void getRootKeyNoValue() {
mockRequest(
InteractionContext.builder()
.request(TestRequest.builder().method(GET).path("/").build())
Expand Down Expand Up @@ -238,7 +238,7 @@ public void getRootKeyNoValue() {
}

@Test
public void getRootNetworkingClient() {
void getRootNetworkingClient() {
mockRequest(
InteractionContext.builder()
.request(TestRequest.builder().method(GET).path("/").build())
Expand All @@ -261,7 +261,7 @@ public void getRootNetworkingClient() {
}

@Test
public void getRootRoutingClientFallback() {
void getRootRoutingClientFallback() {
mockRequest(
InteractionContext.builder()
.request(TestRequest.builder().method(GET).path("/").build())
Expand Down Expand Up @@ -291,7 +291,7 @@ public void getRootRoutingClientFallback() {
}

@Test
public void getRootTokenProviderFallback() {
void getRootTokenProviderFallback() {
mockRequest(
InteractionContext.builder()
.request(TestRequest.builder().method(GET).path("/").build())
Expand Down Expand Up @@ -321,7 +321,7 @@ public void getRootTokenProviderFallback() {
}

@Test
public void getRootUaaClient() {
void getRootUaaClient() {
mockRequest(
InteractionContext.builder()
.request(TestRequest.builder().method(GET).path("/").build())
Expand All @@ -342,7 +342,7 @@ public void getRootUaaClient() {
}

@Test
public void getRootUaaClientFallback() {
void getRootUaaClientFallback() {
mockRequest(
InteractionContext.builder()
.request(TestRequest.builder().method(GET).path("/").build())
Expand Down Expand Up @@ -372,7 +372,7 @@ public void getRootUaaClientFallback() {
}

@Test
public void getWithInvalidRoot() {
void getWithInvalidRoot() {
mockRequest(
InteractionContext.builder()
.request(TestRequest.builder().method(GET).path("/").build())
Expand Down
Loading