com.atlassian.confluence.it
Class TestProperties

java.lang.Object
  extended by com.atlassian.confluence.it.TestProperties

public class TestProperties
extends java.lang.Object

Contains common properties used for testing Confluence's functionality. It includes a properties about the platform being tested.


Field Summary
static boolean CHECK_TEST_TEARDOWN
           
static boolean CLUSTER_MODE
           
static boolean CROWD_MODE
           
static int DB_AND_PLUGINS_SETUP_TIMEOUT
           
static int DEFAULT_MAX_ATTACHMENT_SIZE
           
static int DEFAULT_MAX_ATTACHMENTS_PER_UPLOAD
           
static java.lang.String DEFAULT_USERS_GROUP
           
static int HTTP_REQUEST_TIMEOUT
          Standard time in milliseconds before an http request times out.
static java.lang.String INDRA_BASEURL_PROPERTY_KEY
           
static java.lang.String JIRA_BASEURL_PROPERTY_KEY
           
static TimePeriod PAUSE_ATTACHMENT_NAMING
           
static boolean PAUSE_BACKGROUND_JOBS
           
static TimePeriod PAUSE_LONGTASK
           
static TimePeriod PAUSE_MAIL
           
static int PAUSE_MILLIS
          The length of time to pause between actions must be longer for some databases than others.
static TimePeriod PAUSE_REINDEX
           
static PropertiesManager propertiesManager
           
static int TCP_PORT_RANGE_END
           
static int TCP_PORT_RANGE_START
           
static boolean WATCHDOG_RESIN_MODE
           
static boolean WEBSPHERE_MODE
           
 
Constructor Summary
TestProperties()
           
 
Method Summary
static java.util.Map<java.lang.String,java.lang.String> getAllPropertiesWithPrefix(java.lang.String prefix)
           
static java.lang.String getBaseUrl(int index)
          Our tests support running against multiple Confluence nodes, each with their own base URL.
static java.util.Map<java.lang.String,java.lang.String> getCrowdProperties()
           
static java.util.Map<java.lang.String,java.lang.String> getDelegatedLdapAuthProperties()
           
static java.util.Map<java.lang.String,java.lang.String> getDelegatedLdapGroupSyncProperties()
           
static java.lang.String getJiraBaseurl()
           
static java.util.Map<java.lang.String,java.lang.String> getLdapProperties()
           
static java.util.Map<java.lang.String,java.lang.String> getPrefixedPropertiesFromFile(java.lang.String file, java.lang.String prefix)
           
static java.lang.String getTestProperty(java.lang.String propName)
           
static java.lang.String getTestProperty(java.lang.String propName, java.lang.String defaultPropValue)
           
static boolean getTestPropertyAsBoolean(java.lang.String propName)
          Returns the test property as a boolean value.
static int getTestPropertyAsInt(java.lang.String propName)
           
static boolean isClustered()
           
static boolean isIndraEnabled()
           
static boolean isJiraEnabled()
           
static boolean isOnDemandAlaCarte()
           
static boolean isOnDemandMode()
           
static boolean isOnDemandStandalone()
           
static boolean isSsoAuthenticator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

propertiesManager

public static final PropertiesManager propertiesManager

PAUSE_MILLIS

public static final int PAUSE_MILLIS
The length of time to pause between actions must be longer for some databases than others. Specifically, we know that we store dates in 1 second granularity in Oracle. On Windows, this needs to be between 10 - 16ms, depending on the CPU.


PAUSE_ATTACHMENT_NAMING

public static final TimePeriod PAUSE_ATTACHMENT_NAMING

PAUSE_LONGTASK

public static final TimePeriod PAUSE_LONGTASK

PAUSE_MAIL

public static final TimePeriod PAUSE_MAIL

PAUSE_REINDEX

public static final TimePeriod PAUSE_REINDEX

PAUSE_BACKGROUND_JOBS

public static final boolean PAUSE_BACKGROUND_JOBS

CROWD_MODE

public static final boolean CROWD_MODE

WEBSPHERE_MODE

public static final boolean WEBSPHERE_MODE

WATCHDOG_RESIN_MODE

public static final boolean WATCHDOG_RESIN_MODE

CLUSTER_MODE

public static final boolean CLUSTER_MODE

DEFAULT_MAX_ATTACHMENT_SIZE

public static final int DEFAULT_MAX_ATTACHMENT_SIZE
See Also:
Constant Field Values

DEFAULT_MAX_ATTACHMENTS_PER_UPLOAD

public static final int DEFAULT_MAX_ATTACHMENTS_PER_UPLOAD
See Also:
Constant Field Values

HTTP_REQUEST_TIMEOUT

public static final int HTTP_REQUEST_TIMEOUT
Standard time in milliseconds before an http request times out.


DB_AND_PLUGINS_SETUP_TIMEOUT

public static final int DB_AND_PLUGINS_SETUP_TIMEOUT

TCP_PORT_RANGE_START

public static final int TCP_PORT_RANGE_START

TCP_PORT_RANGE_END

public static final int TCP_PORT_RANGE_END

CHECK_TEST_TEARDOWN

public static final boolean CHECK_TEST_TEARDOWN

DEFAULT_USERS_GROUP

public static final java.lang.String DEFAULT_USERS_GROUP

INDRA_BASEURL_PROPERTY_KEY

public static final java.lang.String INDRA_BASEURL_PROPERTY_KEY
See Also:
Constant Field Values

JIRA_BASEURL_PROPERTY_KEY

public static final java.lang.String JIRA_BASEURL_PROPERTY_KEY
See Also:
Constant Field Values
Constructor Detail

TestProperties

public TestProperties()
Method Detail

getTestProperty

public static java.lang.String getTestProperty(java.lang.String propName)
Parameters:
propName - the property name
Returns:
the property value, or null if the property does not exist
Throws:
java.lang.NullPointerException - if propertiesManager has not been initialised

getTestProperty

public static java.lang.String getTestProperty(java.lang.String propName,
                                               java.lang.String defaultPropValue)

getTestPropertyAsInt

public static int getTestPropertyAsInt(java.lang.String propName)

getTestPropertyAsBoolean

public static boolean getTestPropertyAsBoolean(java.lang.String propName)
Returns the test property as a boolean value. Defaults to false if test property does not exist.


getAllPropertiesWithPrefix

public static java.util.Map<java.lang.String,java.lang.String> getAllPropertiesWithPrefix(java.lang.String prefix)

getLdapProperties

public static java.util.Map<java.lang.String,java.lang.String> getLdapProperties()

getDelegatedLdapAuthProperties

public static java.util.Map<java.lang.String,java.lang.String> getDelegatedLdapAuthProperties()

getDelegatedLdapGroupSyncProperties

public static java.util.Map<java.lang.String,java.lang.String> getDelegatedLdapGroupSyncProperties()

getCrowdProperties

public static java.util.Map<java.lang.String,java.lang.String> getCrowdProperties()

getPrefixedPropertiesFromFile

public static java.util.Map<java.lang.String,java.lang.String> getPrefixedPropertiesFromFile(java.lang.String file,
                                                                                             java.lang.String prefix)

getBaseUrl

public static java.lang.String getBaseUrl(int index)
Our tests support running against multiple Confluence nodes, each with their own base URL. In parallel, these are each separate instances. In a cluster, they're all linked together into one site.

Parameters:
index - the number of the node to get the base URL of. Starts from 1!
Returns:
the base url of that node, or null if there is no such property.

isClustered

public static boolean isClustered()
Returns:
true if testing against a clustered instance of Confluence, false otherwise.

isOnDemandMode

public static boolean isOnDemandMode()
Returns:
true if testing against an OnDemand instance of Confluence, false otherwise.

isOnDemandStandalone

public static boolean isOnDemandStandalone()
Returns:
true if testing against a Standalone OnDemand instance of Confluence, false otherwise.

isOnDemandAlaCarte

public static boolean isOnDemandAlaCarte()

isIndraEnabled

public static boolean isIndraEnabled()

getJiraBaseurl

public static java.lang.String getJiraBaseurl()

isJiraEnabled

public static boolean isJiraEnabled()

isSsoAuthenticator

public static boolean isSsoAuthenticator()
Returns:
true if testing against a Crowd SSO Authenticator as used in OnDemand. In such a situation, users created through Site Import will not be able to log into Confluence.


Copyright © 2003-2014 Atlassian. All Rights Reserved.