You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by "jgoodyear (via GitHub)" <gi...@apache.org> on 2024/08/13 14:42:21 UTC
[PR] [CXF-9046] Close response objects in perf client sample [cxf]
jgoodyear opened a new pull request, #2008:
URL: https://github.com/apache/cxf/pull/2008
(no comment)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CXF-9046] Close response objects in perf client sample [cxf]
Posted by "jgoodyear (via GitHub)" <gi...@apache.org>.
jgoodyear commented on code in PR #2008:
URL: https://github.com/apache/cxf/pull/2008#discussion_r1715487134
##########
distribution/src/main/release/samples/performance/jaxrs/src/main/java/org/apache/cxf/performance/https/client/Client.java:
##########
@@ -85,13 +85,15 @@ public void doJob(WebClient webClient) {
//GET
Response respGet = webClient.get();
Asserts.check(respGet.getStatus() == 200, "Get should have been OK");
+ respGet.close();
break;
case 1:
//POST
Customer customerPost = new Customer();
customerPost.setName("Jack");
try (Response respPost = webClient.post(customerPost)) {
Asserts.check(respPost.getStatus() == 200, "Post should have been OK");
+ respPost.close();
Review Comment:
I'll give it a try and reply here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CXF-9046] Close response objects in perf client sample [cxf]
Posted by "reta (via GitHub)" <gi...@apache.org>.
reta commented on code in PR #2008:
URL: https://github.com/apache/cxf/pull/2008#discussion_r1715470973
##########
distribution/src/main/release/samples/performance/jaxrs/src/main/java/org/apache/cxf/performance/https/client/Client.java:
##########
@@ -85,13 +85,15 @@ public void doJob(WebClient webClient) {
//GET
Response respGet = webClient.get();
Asserts.check(respGet.getStatus() == 200, "Get should have been OK");
+ respGet.close();
break;
case 1:
//POST
Customer customerPost = new Customer();
customerPost.setName("Jack");
try (Response respPost = webClient.post(customerPost)) {
Asserts.check(respPost.getStatus() == 200, "Post should have been OK");
+ respPost.close();
Review Comment:
@jgoodyear you don't need that, `try (Response respPost = webClient.post(customerPost)) {` closes the response (it is `AutoCloseable`)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CXF-9046] Close response objects in perf client sample [cxf]
Posted by "jgoodyear (via GitHub)" <gi...@apache.org>.
jgoodyear commented on code in PR #2008:
URL: https://github.com/apache/cxf/pull/2008#discussion_r1715479937
##########
distribution/src/main/release/samples/performance/jaxrs/src/main/java/org/apache/cxf/performance/https/client/Client.java:
##########
@@ -85,13 +85,15 @@ public void doJob(WebClient webClient) {
//GET
Response respGet = webClient.get();
Asserts.check(respGet.getStatus() == 200, "Get should have been OK");
+ respGet.close();
break;
case 1:
//POST
Customer customerPost = new Customer();
customerPost.setName("Jack");
try (Response respPost = webClient.post(customerPost)) {
Asserts.check(respPost.getStatus() == 200, "Post should have been OK");
+ respPost.close();
Review Comment:
I'm happy to remove from the POST call - the GET call certainly has lingering connections
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CXF-9046] Close response objects in perf client sample [cxf]
Posted by "jgoodyear (via GitHub)" <gi...@apache.org>.
jgoodyear commented on code in PR #2008:
URL: https://github.com/apache/cxf/pull/2008#discussion_r1715474500
##########
distribution/src/main/release/samples/performance/jaxrs/src/main/java/org/apache/cxf/performance/https/client/Client.java:
##########
@@ -85,13 +85,15 @@ public void doJob(WebClient webClient) {
//GET
Response respGet = webClient.get();
Asserts.check(respGet.getStatus() == 200, "Get should have been OK");
+ respGet.close();
break;
case 1:
//POST
Customer customerPost = new Customer();
customerPost.setName("Jack");
try (Response respPost = webClient.post(customerPost)) {
Asserts.check(respPost.getStatus() == 200, "Post should have been OK");
+ respPost.close();
Review Comment:
It does not close soon enough under load scenario.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CXF-9046] Close response objects in perf client sample [cxf]
Posted by "reta (via GitHub)" <gi...@apache.org>.
reta merged PR #2008:
URL: https://github.com/apache/cxf/pull/2008
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CXF-9046] Close response objects in perf client sample [cxf]
Posted by "reta (via GitHub)" <gi...@apache.org>.
reta commented on code in PR #2008:
URL: https://github.com/apache/cxf/pull/2008#discussion_r1715482971
##########
distribution/src/main/release/samples/performance/jaxrs/src/main/java/org/apache/cxf/performance/https/client/Client.java:
##########
@@ -85,13 +85,15 @@ public void doJob(WebClient webClient) {
//GET
Response respGet = webClient.get();
Asserts.check(respGet.getStatus() == 200, "Get should have been OK");
+ respGet.close();
break;
case 1:
//POST
Customer customerPost = new Customer();
customerPost.setName("Jack");
try (Response respPost = webClient.post(customerPost)) {
Asserts.check(respPost.getStatus() == 200, "Post should have been OK");
+ respPost.close();
Review Comment:
```
try (Response respGet = webClient.get()) {
Asserts.check(respGet.getStatus() == 200, "Get should have been OK");
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CXF-9046] Close response objects in perf client sample [cxf]
Posted by "jgoodyear (via GitHub)" <gi...@apache.org>.
jgoodyear commented on code in PR #2008:
URL: https://github.com/apache/cxf/pull/2008#discussion_r1715474500
##########
distribution/src/main/release/samples/performance/jaxrs/src/main/java/org/apache/cxf/performance/https/client/Client.java:
##########
@@ -85,13 +85,15 @@ public void doJob(WebClient webClient) {
//GET
Response respGet = webClient.get();
Asserts.check(respGet.getStatus() == 200, "Get should have been OK");
+ respGet.close();
break;
case 1:
//POST
Customer customerPost = new Customer();
customerPost.setName("Jack");
try (Response respPost = webClient.post(customerPost)) {
Asserts.check(respPost.getStatus() == 200, "Post should have been OK");
+ respPost.close();
Review Comment:
It does not close soon enough under load scenario.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@cxf.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org