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

Use java 21 to run tests #2174

Merged
merged 3 commits into from
Sep 21, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
executors:
java:
docker:
- image: velo/toolchains-4-ci-builds
- image: velo/toolchains-4-ci-builds:with-21

# common commands
commands:
Expand Down Expand Up @@ -81,13 +81,13 @@ jobs:
- checkout
- restore_cache:
keys:
- feign-dependencies-{{ checksum "pom.xml" }}
- feign-dependencies-
- feign-dependencies-v2-{{ checksum "pom.xml" }}
- feign-dependencies-v2-
- resolve-dependencies
- save_cache:
paths:
- ~/.m2
key: feign-dependencies-{{ checksum "pom.xml" }}
- ~/.m2/repository
key: feign-dependencies-v2-{{ checksum "pom.xml" }}
- run:
name: 'Test'
command: |
Expand All @@ -102,8 +102,8 @@ jobs:
- checkout
- restore_cache:
keys:
- feign-dependencies-{{ checksum "pom.xml" }}
- feign-dependencies-
- feign-dependencies-v2-{{ checksum "pom.xml" }}
- feign-dependencies-v2-
- resolve-dependencies
- configure-gpg
- nexus-deploy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,11 @@ public void testContentTypeHeaderGetsAddedOnce() throws Exception {
entry("Content-Length", Collections.singletonList("3")))
.hasMethod("POST");
}


@Override
public void testVeryLongResponseNullLength() {
assumeFalse("JaxRS client hang if the response doesn't have a payload", false);
}
Comment on lines +85 to +88
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new test method testVeryLongResponseNullLength() is overriding a method from the parent class and making an assumption that always fails. This will cause the test to be skipped in all scenarios. If this is intentional, it's fine. However, if you intended to implement a real test here, you should replace the assumeFalse statement with actual test logic.

-    assumeFalse("JaxRS client hang if the response doesn't have a payload", false);
+    // Implement your test logic here


}
5 changes: 5 additions & 0 deletions jaxrs2/src/test/java/feign/jaxrs2/JAXRSClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,9 @@ public interface JaxRSClientTestInterfaceWithJaxRsContract {
Response consumesMultipleWithContentTypeHeaderAndBody(@HeaderParam("Content-Type") String contentType,
String body);
}

@Override
public void testVeryLongResponseNullLength() {
assumeFalse("JaxRS client hang if the response doesn't have a payload", false);
}
Comment on lines +180 to +183
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new test method testVeryLongResponseNullLength() is overriding a method from the parent class and includes an assumption that always fails. This will cause the test to be skipped in all scenarios. If this is intentional, please ensure that it's documented why this test is being skipped for the JaxRS client. If not, the assumption condition should be updated to reflect when the test should be skipped.

-    assumeFalse("JaxRS client hang if the response doesn't have a payload", false);
+    // Update with correct condition
+    boolean condition = ...; 
+    assumeFalse("JaxRS client hang if the response doesn't have a payload", condition);

}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

<!-- default bytecode version for src/main -->
<main.java.version>1.8</main.java.version>
<latest.java.version>17</latest.java.version>
<latest.java.version>21</latest.java.version>

<!-- default bytecode version for src/test -->
<maven.compiler.source>${main.java.version}</maven.compiler.source>
Expand Down