public class DbCachingTestHelper extends Object
Modifier and Type | Class and Description |
---|---|
class |
DbCachingTestHelper.PartialSyncTask
Uses the Builder pattern to create a synchronisation task.
|
static class |
DbCachingTestHelper.SyncInfo
Information about the synchronisation.
|
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_MAX_SYNC_WAIT_TIME_MS |
protected static String |
LAST_SYNC_INFO_ELEM_ID |
Constructor and Description |
---|
DbCachingTestHelper(net.sourceforge.jwebunit.junit.WebTester tester) |
Modifier and Type | Method and Description |
---|---|
boolean |
isSynchronising()
Returns true if the directory is currently being synchronised.
|
boolean |
notYetSynchronised() |
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.
|
protected static final String LAST_SYNC_INFO_ELEM_ID
public static final long DEFAULT_MAX_SYNC_WAIT_TIME_MS
public DbCachingTestHelper(net.sourceforge.jwebunit.junit.WebTester tester)
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 finishRuntimeException
- 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 taskRuntimeException
- 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 finishRuntimeException
- 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 taskRuntimeException
- 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 synchronisepublic boolean isSynchronising()
public boolean notYetSynchronised()
Copyright © 2019 Atlassian. All rights reserved.