|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.crowd.acceptance.utils.DbCachingTestHelper
public class DbCachingTestHelper
Helper class for testing DB caching directories.
Nested Class Summary | |
---|---|
class |
DbCachingTestHelper.PartialSyncTask
Uses the Builder pattern to create a synchronisation task. |
static class |
DbCachingTestHelper.SyncInfo
Information about the synchronisation. |
Field Summary | |
---|---|
static long |
DEFAULT_MAX_SYNC_WAIT_TIME_MS
|
protected static String |
LAST_SYNC_INFO_ELEM_ID
|
Constructor Summary | |
---|---|
DbCachingTestHelper(net.sourceforge.jwebunit.junit.WebTester tester)
|
Method Summary | |
---|---|
boolean |
isSynchronising()
Returns true if the directory is currently being synchronised. |
DbCachingTestHelper.PartialSyncTask |
syncDirectoryTask(String directoryName)
Creates a partial sync task. |
DbCachingTestHelper.SyncInfo |
synchroniseDirectory(String directoryName,
long maxWaitTimeMs)
Synchronises the directory and waits until the synchronisation has finished. |
DbCachingTestHelper.SyncInfo |
synchroniseDirectory(String directoryName,
long maxWaitTimeMs,
String shortDescription)
Synchronises the directory and waits until the synchronisation has finished. |
static DbCachingTestHelper.SyncInfo |
synchroniseDirectory(net.sourceforge.jwebunit.junit.WebTester tester,
String directoryName,
long maxWaitTimeMs)
Synchronises the directory and waits until the synchronisation has finished. |
static DbCachingTestHelper.SyncInfo |
synchroniseDirectory(net.sourceforge.jwebunit.junit.WebTester tester,
String directoryName,
long maxWaitTimeMs,
String shortDescription)
Synchronises the directory and waits until the synchronisation has finished. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String LAST_SYNC_INFO_ELEM_ID
public static final long DEFAULT_MAX_SYNC_WAIT_TIME_MS
Constructor Detail |
---|
public DbCachingTestHelper(net.sourceforge.jwebunit.junit.WebTester tester)
Method Detail |
---|
public DbCachingTestHelper.SyncInfo synchroniseDirectory(String directoryName, long maxWaitTimeMs)
directoryName
- name of the directory to synchronisemaxWaitTimeMs
- maximum time in milliseconds to wait for the synchronisation to finish
RuntimeException
- if the synchronisation doesn't finish within maxWaitTimeMs milliseconds.public DbCachingTestHelper.SyncInfo synchroniseDirectory(String directoryName, long maxWaitTimeMs, String shortDescription)
directoryName
- name of the directory to synchronisemaxWaitTimeMs
- maximum time in milliseconds to wait for the synchronisation to finishshortDescription
- description about the synchronisation task
RuntimeException
- if the synchronisation doesn't finish within maxWaitTimeMs milliseconds.public static DbCachingTestHelper.SyncInfo synchroniseDirectory(net.sourceforge.jwebunit.junit.WebTester tester, String directoryName, long maxWaitTimeMs)
tester
- WebTesterdirectoryName
- name of the directory to synchronisemaxWaitTimeMs
- maximum time in milliseconds to wait for the synchronisation to finish
RuntimeException
- if the synchronisation doesn't finish within DEFAULT_MAX_SYNC_WAIT_TIME_MS milliseconds.public static DbCachingTestHelper.SyncInfo synchroniseDirectory(net.sourceforge.jwebunit.junit.WebTester tester, String directoryName, long maxWaitTimeMs, String shortDescription)
tester
- WebTesterdirectoryName
- name of the directory to synchronisemaxWaitTimeMs
- maximum time in milliseconds to wait for the synchronisation to finishshortDescription
- description about the synchronisation task
RuntimeException
- if the synchronisation doesn't finish within DEFAULT_MAX_SYNC_WAIT_TIME_MS milliseconds.public DbCachingTestHelper.PartialSyncTask syncDirectoryTask(String directoryName)
DbCachingTestHelper dbCachingTestHelper = new DbCachingTestHelper(tester);
dbCachingTestHelper.syncDirectoryTask("ApacheDS).
maxWaitMs(1000L).
shortDescription("Adding 10 users").
sync();
directoryName
- name of the directory to synchronise
public boolean isSynchronising()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |