public class ConfluenceInjectedBaseUrlSelector extends Object implements BaseUrlSelector
Constructor and Description |
---|
ConfluenceInjectedBaseUrlSelector(List<String> baseUrls) |
ConfluenceInjectedBaseUrlSelector(String baseUrl) |
Modifier and Type | Method and Description |
---|---|
Collection<String> |
getAllNodeBaseUrls() |
String |
getBaseUrl() |
String |
getConfiguredBaseUrl() |
String |
substituteForNodeBaseUrl(String url)
Our cluster builds don't have a load balancer, this base URL actually points at node 1.
|
public ConfluenceInjectedBaseUrlSelector(String baseUrl)
public String getBaseUrl()
getBaseUrl
in interface BaseUrlSelector
public Collection<String> getAllNodeBaseUrls()
getAllNodeBaseUrls
in interface BaseUrlSelector
public String getConfiguredBaseUrl()
getConfiguredBaseUrl
in interface BaseUrlSelector
BaseUrlSelector.getBaseUrl()
.public String substituteForNodeBaseUrl(String url)
BaseUrlSelector
BaseUrlSelector.getConfiguredBaseUrl()
in it by the server, then pinging that URL
will take it to node 1, and the test will fail.
This method checks to see if the given URL starts with the BaseUrlSelector.getConfiguredBaseUrl()
, and if so then
substitutes it with the BaseUrlSelector.getBaseUrl()
that points at the node that the current test is running against.
It also checks to see if the given URL starts with the base URL of any of the other cluster nodes, and performs a similar substitution.
If and when our cluster builds get a load balancer, we should be able to take this nastiness out.
substituteForNodeBaseUrl
in interface BaseUrlSelector
Copyright © 2003–2017 Atlassian. All rights reserved.