Interface BaseUrlSelector

All Known Implementing Classes:
ConfluenceBaseUrlSelector

@Deprecated public interface BaseUrlSelector
Deprecated.
Please use confluence-test-utils module instead. See {com.atlassian.confluence.test.BaseUrlSelector} alternative
Since:
5.6
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated.
     
    Deprecated.
     
    Deprecated.
     
    Deprecated.
    Our cluster builds don't have a load balancer, this base URL actually points at node 1.
    default com.atlassian.confluence.test.BaseUrlSelector
    Deprecated.
    Return an adapter to the confluence-test-utils edition of BaseUrl, that passes through all method calls except BaseUrlSelector.switchToNode(int).
  • Method Details

    • getBaseUrl

      String getBaseUrl()
      Deprecated.
      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

      Collection<String> getAllNodeBaseUrls()
      Deprecated.
      Returns:
      a collection of the baseUrls of all of the nodes in the cluster, or a collection of one baseUrl if not clustered.
    • getConfiguredBaseUrl

      String getConfiguredBaseUrl()
      Deprecated.
      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 getBaseUrl().
    • substituteForNodeBaseUrl

      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 the 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 getConfiguredBaseUrl(), and if so then substitutes it with the 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.

    • undeprecate

      default com.atlassian.confluence.test.BaseUrlSelector undeprecate()
      Deprecated.
      Return an adapter to the confluence-test-utils edition of BaseUrl, that passes through all method calls except BaseUrlSelector.switchToNode(int).