Skip to content

Commit 3c60829

Browse files
authored
Fix tests on CS build when cloudstack-management service is running (#8009)
1 parent 28c4be1 commit 3c60829

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

plugins/storage/volume/scaleio/src/test/java/org/apache/cloudstack/storage/datastore/client/ScaleIOGatewayClientImplTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ public class ScaleIOGatewayClientImplTest {
5858

5959
@Rule
6060
public WireMockRule wireMockRule = new WireMockRule(wireMockConfig()
61-
.httpsPort(port)
61+
.dynamicHttpsPort()
62+
.dynamicPort()
6263
.needClientAuth(false)
6364
.basicAdminAuthenticator(username, password)
6465
.bindAddress("localhost"));
@@ -70,7 +71,7 @@ public void setUp() throws Exception {
7071
.withHeader("content-type", "application/json;charset=UTF-8")
7172
.withBody(sessionKey)));
7273

73-
client = new ScaleIOGatewayClientImpl(String.format("https://localhost:%d/api", port), username, password, false, timeout, maxConnections);
74+
client = new ScaleIOGatewayClientImpl(String.format("https://localhost:%d/api", wireMockRule.httpsPort()), username, password, false, timeout, maxConnections);
7475

7576
wireMockRule.stubFor(post("/api/types/Volume/instances")
7677
.willReturn(aResponse()

0 commit comments

Comments
 (0)