Package com.atlassian.confluence.it
Class ConfluenceBaseUrlSelector
- java.lang.Object
-
- com.atlassian.confluence.it.ConfluenceBaseUrlSelector
-
- All Implemented Interfaces:
BaseUrlSelector
@Deprecated public class ConfluenceBaseUrlSelector extends Object implements BaseUrlSelector
Deprecated.Please use confluence-test-utils module instead. See {com.atlassian.confluence.test.ConfluenceBaseUrlSelector} alternative
-
-
Field Summary
Fields Modifier and Type Field Description static RandomnessHandler
RANDOMNESS_HANDLER
Deprecated.
-
Constructor Summary
Constructors Constructor Description ConfluenceBaseUrlSelector()
Deprecated.Since 5.6 UseConfluenceBaseUrlSelector(org.slf4j.Logger)
ConfluenceBaseUrlSelector(@NonNull org.slf4j.Logger logger)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description List<String>
getAllNodeBaseUrls()
Deprecated.String
getBaseUrl()
Deprecated.String
getConfiguredBaseUrl()
Deprecated.String
substituteForNodeBaseUrl(String url)
Deprecated.Our cluster builds don't have a load balancer, this base URL actually points at node 1.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.it.BaseUrlSelector
undeprecate
-
-
-
-
Field Detail
-
RANDOMNESS_HANDLER
public static final RandomnessHandler RANDOMNESS_HANDLER
Deprecated.
-
-
Constructor Detail
-
ConfluenceBaseUrlSelector
@Deprecated public ConfluenceBaseUrlSelector()
Deprecated.Since 5.6 UseConfluenceBaseUrlSelector(org.slf4j.Logger)
-
ConfluenceBaseUrlSelector
public ConfluenceBaseUrlSelector(@NonNull org.slf4j.Logger logger)
Deprecated.
-
-
Method Detail
-
getBaseUrl
public String getBaseUrl()
Deprecated.- Specified by:
getBaseUrl
in interfaceBaseUrlSelector
- Returns:
- The base url that is used in tests. Note that in case of cluster it will return a base url of the node that the current test is running against. Important: This is not the configured base url.
-
getAllNodeBaseUrls
public List<String> getAllNodeBaseUrls()
Deprecated.- Specified by:
getAllNodeBaseUrls
in interfaceBaseUrlSelector
- Returns:
- a collection of the baseUrls of all of the nodes in the cluster, or a collection of one baseUrl if not clustered.
-
getConfiguredBaseUrl
public String getConfiguredBaseUrl()
Deprecated.- Specified by:
getConfiguredBaseUrl
in interfaceBaseUrlSelector
- Returns:
- The url that has been configured as the base URl of the whole application cluster (e.g. the load balancer). If not clustered, this returns the same value as
BaseUrlSelector.getBaseUrl()
.
-
substituteForNodeBaseUrl
public String substituteForNodeBaseUrl(String url)
Deprecated.Our cluster builds don't have a load balancer, this base URL actually points at node 1. If a test runs against node 2, and is given a URL with theBaseUrlSelector.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 theBaseUrlSelector.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.
- Specified by:
substituteForNodeBaseUrl
in interfaceBaseUrlSelector
-
-