cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "KARR, DAVID" <dk0...@att.com>
Subject Strategies for randomizing or verifying port number for JAXRSServerFactoryBean, or using local transport
Date Fri, 12 Jan 2018 22:30:43 GMT
Our codebase is going to have some unit tests using JAXRSServerFactoryBean.  To be reliable,
I not only have to ensure that I use a port number that is uncommon, I have to make sure that
the other unit tests are using a different port.

Besides just using a plain random number generator in a range, are there any viable strategies
for doing this?

I thought about using "local transport" (https://cwiki.apache.org/confluence/display/CXF20DOC/JAXRS+Testing),
which might solve this problem, but it appears that doing this requires at least a small change
on the client side (setting DIRECT_DISPATCH on the request context), and I'm not sure our
client interface is even compatible.  We're using Client to get a WebTarget, and then an Invocation.Builder.
 Is it even possible to set this to use direct dispatch?

Mime
View raw message