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 boolean DB2_MODE
           
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 boolean LDAP_MODE
           
static boolean ORACLE_MODE
           
static int PAUSE_MILLIS
          The length of time to pause between actions must be longer for some databases than others.
static PropertiesManager propertiesManager
           
static boolean SQL_SERVER_MODE
          True when testing MS SQL Server.
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 String getConfiguredBaseUrl()
          Returns the configured base URL in the Confluence app.
static int getDidYouMeanIndexTimeout()
          Timeout for building the "DidYouMean" index.
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()
           
 
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.


LDAP_MODE

public static final boolean LDAP_MODE

CROWD_MODE

public static final boolean CROWD_MODE

DB2_MODE

public static final boolean DB2_MODE

SQL_SERVER_MODE

public static final boolean SQL_SERVER_MODE
True when testing MS SQL Server. It's determined by the "database.name" property, because having an additional a specific property seems uncalled for.


ORACLE_MODE

public static final boolean ORACLE_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.


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
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.


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

getConfiguredBaseUrl

public static String getConfiguredBaseUrl()
Returns the configured base URL in the Confluence app. This is the same as the base URL of node #1 in a cluster.

Returns:
the configured base url

isClustered

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


Copyright © 2003-2011 Atlassian. All Rights Reserved.