reta commented on code in PR #3656:
URL: https://github.com/apache/cxf/pull/3656#discussion_r4429382538
##########
systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/AbstractFailoverTest.java:
##########
@@ -238,6 +238,9 @@ protected void strategyTest(String inactiveReplica,
for (int i = 0; i < 20; i++) {
if (!singleProxy) {
+ if (bookStore != null) {
+ WebClient.client(bookStore).close();
+ }
feature.getTargetSelector().close();
bookStore = getBookStore(inactiveReplica, feature);
Review Comment:
Sorry @ffang, same here?
```
try (bookStore = getBookStore(inactiveReplica, feature)) {
}
```
##########
systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/AbstractFailoverTest.java:
##########
@@ -297,39 +300,40 @@ protected void strategyTestWebClient(String
inactiveReplica,
String prevEndpoint = null;
for (int i = 0; i < 20; i++) {
feature.getTargetSelector().close();
- WebClient bookStore = getWebClient(inactiveReplica, feature);
- verifyStrategy(bookStore, expectRandom
- ? RandomStrategy.class
- : SequentialStrategy.class);
- String bookId = expectServerException ? "9999" : "123";
- bookStore.path("bookstore/books").path(bookId);
- Exception ex = null;
- try {
- Book book = bookStore.get(Book.class);
- assertNotNull("expected non-null response", book);
- assertEquals("unexpected id", 123L, book.getId());
- } catch (Exception error) {
- if (!expectServerException) {
- throw error;
+ try (WebClient bookStore = getWebClient(inactiveReplica, feature))
{
Review Comment:
:+1
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]