org.apache.qpid.junit.extensions
Interface TestThreadAware


public interface TestThreadAware

This interface can be implemented by tests that want to know if they are being run concurrently. It provides lifecycle notification events to tell the test implementation when test threads are being created and destroyed. This can assist tests in creating and destroying resources that exist over the life of a test thread. A single test thread can excute the same test many times, and often it is convenient to keep resources, for example network connections, open over many test calls.

CRC Card
Responsibilities
Set up per thread test fixtures.
Clean up per thread test fixtures.


Method Summary
 void postThreadSetUp()
          Called after all threads have completed their setup.
 void threadSetUp()
          Called when a test thread is created.
 void threadTearDown()
          Called when a test thread is destroyed.
 

Method Detail

threadSetUp

void threadSetUp()
Called when a test thread is created.


postThreadSetUp

void postThreadSetUp()
Called after all threads have completed their setup.


threadTearDown

void threadTearDown()
Called when a test thread is destroyed.



Licensed to the Apache Software Foundation