public abstract class AbstractTest extends Object
| Constructor and Description |
|---|
AbstractTest() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addBackgroundJob(Runnable job)
Adds a background thread that repeatedly executes the given job
until all the iterations of this test have been executed.
|
protected void |
afterSuite()
Run after all iterations of this test have been executed.
|
protected void |
afterTest() |
protected void |
beforeSuite()
Run before any iterations of this test get executed.
|
protected void |
beforeTest() |
long |
execute()
Executes a single iteration of this test.
|
protected void |
failOnRepositoryVersions(String... versions) |
protected javax.jcr.Credentials |
getCredentials() |
protected javax.jcr.Repository |
getRepository() |
protected static int |
getScale(int def) |
protected javax.jcr.Session |
loginReader()
Returns a new reader session that will be automatically closed once
all the iterations of this test have been executed.
|
protected javax.jcr.Session |
loginWriter()
Returns a new writer session that will be automatically closed once
all the iterations of this test have been executed.
|
protected abstract void |
runTest() |
void |
setUp(javax.jcr.Repository repository,
javax.jcr.Credentials credentials)
Prepares this performance benchmark.
|
void |
tearDown()
Cleans up after this performance benchmark.
|
String |
toString() |
protected static int getScale(int def)
public void setUp(javax.jcr.Repository repository,
javax.jcr.Credentials credentials)
throws Exception
repository - the repository to usecredentials - credentials of a user with write accessException - if the benchmark can not be preparedpublic long execute()
throws Exception
Exception - if an error occurspublic void tearDown()
throws Exception
Exception - if the benchmark can not be cleaned upprotected void beforeSuite()
throws Exception
Exception - if an error occursprotected void afterSuite()
throws Exception
Exception - if an error occursprotected void failOnRepositoryVersions(String... versions) throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionprotected javax.jcr.Repository getRepository()
protected javax.jcr.Credentials getCredentials()
protected javax.jcr.Session loginReader()
protected javax.jcr.Session loginWriter()
protected void addBackgroundJob(Runnable job)
job - background jobCopyright © 2012-2013 The Apache Software Foundation. All Rights Reserved.