Fix testCloudProfile to connect to "localhost"
When we don't specify the `host` property for the `CachingConnectionFactory`, it is selected by the `InetAddress.getLocalHost().getHostName()`, which might not be "localhost" as it is allowed for the `guest` user on RabbitMQ. This also may cause some unexpected loop-backs on the network interface during connection attempt **Cherry-pick to 1.3.x**
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015-2017 the original author or authors.
|
||||
* Copyright 2015-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -291,7 +291,7 @@ public class RabbitBinderModuleTests {
|
||||
public Cloud cloud() {
|
||||
Cloud cloud = mock(Cloud.class);
|
||||
|
||||
willReturn(new CachingConnectionFactory())
|
||||
willReturn(new CachingConnectionFactory("localhost"))
|
||||
.given(cloud)
|
||||
.getSingletonServiceConnector(ConnectionFactory.class, null);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user