org.exist.xmldb.test.concurrent
Class ConcurrentTestBase

java.lang.Object
  extended byTestCase
      extended byorg.exist.xmldb.test.concurrent.ConcurrentTestBase
Direct Known Subclasses:
ComplexUpdateTest, ConcurrentAttrUpdateTest, ConcurrentQueryTest, ConcurrentQueryUpdateTest, ConcurrentResourceTest, ConcurrentResourceTest2, ConcurrentResourceTest3, ConcurrentXUpdateTest, TextUpdateTest, ValueIndexUpdateTest

public abstract class ConcurrentTestBase
extends TestCase

Abstract base class for concurrent tests.

Author:
wolf
See Also:
Serialized Form

Field Summary
protected  java.util.List actions
           
protected  boolean failed
           
protected  Collection rootCol
           
protected  java.lang.String rootColURI
           
protected  Collection testCol
           
protected  java.lang.String testColName
           
 
Constructor Summary
ConcurrentTestBase(java.lang.String name, java.lang.String uri, java.lang.String testCollection)
           
 
Method Summary
 void addAction(Action action, int repeat, long delayBeforeStart, long delay)
          Add an Action to the list of actions that will be processed concurrently.
 Collection getTestCollection()
           
protected  void setUp()
           
protected  void tearDown()
           
 void testConcurrent()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rootColURI

protected java.lang.String rootColURI

rootCol

protected Collection rootCol

testColName

protected java.lang.String testColName

testCol

protected Collection testCol

actions

protected java.util.List actions

failed

protected volatile boolean failed
Constructor Detail

ConcurrentTestBase

public ConcurrentTestBase(java.lang.String name,
                          java.lang.String uri,
                          java.lang.String testCollection)
Parameters:
name - the name of the test.
uri - the XMLDB URI of the root collection.
testCollection - the name of the collection that will be created for the test.
Method Detail

addAction

public void addAction(Action action,
                      int repeat,
                      long delayBeforeStart,
                      long delay)
Add an Action to the list of actions that will be processed concurrently. Should be called after setUp().

Parameters:
action - the action.
repeat - number of times the actions should be repeated.

getTestCollection

public Collection getTestCollection()

testConcurrent

public void testConcurrent()

setUp

protected void setUp()

tearDown

protected void tearDown()


<oXygen/> XML Editor provides support for editing and debugging XQuery expressions against the eXist XML Database.