mirror of
https://github.com/apache/activemq-artemis.git
synced 2025-02-19 16:36:40 +00:00
ARTEMIS-4174: test is verifying hostname detail, so use floating ports to avoid sporadic bind failures that are happening
This commit is contained in:
parent
aa4e4409bf
commit
9864e005d2
artemis-server/src
main/java/org/apache/activemq/artemis/core/server/management
test/java/org/apache/activemq/artemis/core/server/management
@ -63,7 +63,7 @@ public class RmiRegistryFactory {
|
||||
* Create a server socket for testing purposes.
|
||||
*/
|
||||
ServerSocket createTestSocket() throws IOException {
|
||||
return socketFactory.createServerSocket(1100);
|
||||
return socketFactory.createServerSocket(0);
|
||||
}
|
||||
|
||||
public Object getObject() throws Exception {
|
||||
|
@ -31,7 +31,7 @@ public class JMXRMIRegistryPortTest extends ActiveMQTestBase {
|
||||
public void explicitLocalhostRegistry() throws IOException {
|
||||
RmiRegistryFactory registryFactory = new RmiRegistryFactory();
|
||||
registryFactory.setHost("localhost");
|
||||
registryFactory.setPort(1099);
|
||||
registryFactory.setPort(0);
|
||||
registryFactory.init();
|
||||
runAfter(registryFactory::destroy);
|
||||
try (ServerSocket testSocket = registryFactory.createTestSocket()) {
|
||||
@ -43,7 +43,7 @@ public class JMXRMIRegistryPortTest extends ActiveMQTestBase {
|
||||
public void unlimitedHostRegistry() throws IOException {
|
||||
RmiRegistryFactory registryFactory = new RmiRegistryFactory();
|
||||
registryFactory.setHost(null);
|
||||
registryFactory.setPort(1099);
|
||||
registryFactory.setPort(0);
|
||||
registryFactory.init();
|
||||
runAfter(registryFactory::destroy);
|
||||
try (ServerSocket testSocket = registryFactory.createTestSocket()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user