|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.extensions.TestDecorator
org.apache.qpid.junit.extensions.WrappedSuiteTestDecorator
org.apache.qpid.test.framework.qpid.CauseFailureDecorator
public class CauseFailureDecorator
CauseFailureDecorator applies decorations to BrokerLifecycleAware
tests, so that they may use different failure
mechanisms. It is capable of detecting when a test case uses in-vm brokers, and setting up an automatic failure
for those tests, so that the current live broker can be shut-down by test cases. For external brokers, automatic
failure could be implemented, for example by having a kill script. At the moment this sets up the failure to prompt
a user interactively to cause a failure, using CauseFailureUserPrompt
.
Responsibilities | Collaborations |
---|---|
Setup automatic failures for in-vm brokers. | CauseFailureInVM
|
Setup user generated failures for external brokers. | CauseFailureUserPrompt .
|
Field Summary |
---|
Fields inherited from class org.apache.qpid.junit.extensions.WrappedSuiteTestDecorator |
---|
suite |
Fields inherited from class junit.extensions.TestDecorator |
---|
fTest |
Constructor Summary | |
---|---|
CauseFailureDecorator(org.apache.qpid.junit.extensions.WrappedSuiteTestDecorator test)
Creates a wrapped test test decorator from another one. |
Method Summary | |
---|---|
void |
run(junit.framework.TestResult testResult)
Runs the tests with a LocalAMQPCircuitFactory. |
String |
toString()
Prints the name of the test for debugging purposes. |
Methods inherited from class org.apache.qpid.junit.extensions.WrappedSuiteTestDecorator |
---|
countTestCases, getAllUnderlyingTests, testAt |
Methods inherited from class junit.extensions.TestDecorator |
---|
basicRun, getTest |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CauseFailureDecorator(org.apache.qpid.junit.extensions.WrappedSuiteTestDecorator test)
test
- The test test.Method Detail |
---|
public void run(junit.framework.TestResult testResult)
run
in interface junit.framework.Test
run
in class junit.extensions.TestDecorator
testResult
- The the results object to monitor the test results with.public String toString()
toString
in class junit.extensions.TestDecorator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |