com.atlassian.confluence.it
Class TestProperties

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

public class TestProperties
extends 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 int HTTP_REQUEST_TIMEOUT
          Standard time in milliseconds before an http request times out.
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 Map<String,String> getAllPropertiesWithPrefix(String prefix)
           
static String getBaseUrl(int index)
          Our tests support running against multiple Confluence nodes, each with their own base URL.
static Map<String,String> getCrowdProperties()
           
static Map<String,String> getDelegatedLdapAuthProperties()
           
static Map<String,String> getDelegatedLdapGroupSyncProperties()
           
static int getDidYouMeanIndexTimeout()
          Timeout for building the "DidYouMean" index.
static Map<String,String> getLdapProperties()
           
static Map<String,String> getPrefixedPropertiesFromFile(String file, String prefix)
           
static String getTestProperty(String propName)
           
static boolean getTestPropertyAsBoolean(String propName)
          Returns the test property as a boolean value.
static int getTestPropertyAsInt(String propName)
           
static boolean isClustered()
           
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
Constructor Detail

TestProperties

public TestProperties()
Method Detail

getTestProperty

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

getTestPropertyAsInt

public static int getTestPropertyAsInt(String propName)

getTestPropertyAsBoolean

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


getAllPropertiesWithPrefix

public static Map<String,String> getAllPropertiesWithPrefix(String prefix)

getLdapProperties

public static Map<String,String> getLdapProperties()

getDelegatedLdapAuthProperties

public static Map<String,String> getDelegatedLdapAuthProperties()

getDelegatedLdapGroupSyncProperties

public static Map<String,String> getDelegatedLdapGroupSyncProperties()

getCrowdProperties

public static Map<String,String> getCrowdProperties()

getPrefixedPropertiesFromFile

public static Map<String,String> getPrefixedPropertiesFromFile(String file,
                                                               String prefix)

getDidYouMeanIndexTimeout

public static int getDidYouMeanIndexTimeout()
Timeout for building the "DidYouMean" index. This can take longer on some platforms, such as clusters, in which case the timeout can be increased with a system property of "didyoumean.index.timeout".

Returns:
the length of the timeout in milliseconds

getBaseUrl

public static 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()

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-2013 Atlassian. All Rights Reserved.