apupier commented on code in PR #28184:
URL: https://github.com/apache/camel/pull/28184#discussion_r4325618152
##########
components/camel-cxf/camel-cxf-common/src/test/java/org/apache/camel/component/cxf/common/CXFTestSupport.java:
##########
@@ -19,72 +19,70 @@
import org.apache.camel.test.AvailablePortFinder;
/**
- * For test cases that use unique contexts, they can share the ports which
will make things a bit faster as ports aren't
- * opened and closed all the time.
+ * Provides pre-allocated port numbers as system properties for test cases and
Spring XML contexts.
*/
public final class CXFTestSupport {
- static final int PORT1 = AvailablePortFinder.getNextRandomAvailable();
- static final int PORT2 = AvailablePortFinder.getNextRandomAvailable();
- static final int PORT3 = AvailablePortFinder.getNextRandomAvailable();
- static final int PORT4 = AvailablePortFinder.getNextRandomAvailable();
- static final int PORT5 = AvailablePortFinder.getNextRandomAvailable();
- static final int PORT6 = AvailablePortFinder.getNextRandomAvailable();
- static final int PORT7 = AvailablePortFinder.getNextRandomAvailable();
- static final int SSL_PORT = AvailablePortFinder.getNextRandomAvailable();
+ static final AvailablePortFinder.Port PORT1 = AvailablePortFinder.find();
Review Comment:
based on observation and y understanding, replacing this deprecated methods
should really help to both stabilize and improve speed. To do more largely in
the code base in another PR
--
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]