|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.Assert junit.framework.TestCase org.xmlBlaster.test.memoryleak.TestThreadLeak
public class TestThreadLeak
This does a twofold test by creating a number of connection, an almost infinite number of times. It tests two stuff: 1. if the client side is leaking threads. 2. if Jacorb contains a locking bug.
Nested Class Summary | |
---|---|
(package private) class |
TestThreadLeak.ConnectorWorker
Connect to XmlBlaster and disconnect after timeout milis. |
Field Summary | |
---|---|
private java.util.ArrayList |
connections
|
private long |
cttl
Time a connection should live, before beeing taken down |
private java.lang.String |
fileName
|
private Global |
glob
|
private static java.util.logging.Logger |
log
|
private int |
maxThreadDiff
|
private static java.lang.String |
ME
|
private int |
noConnections
|
private boolean |
noError
|
private java.lang.String |
osName
|
private java.lang.String |
pid
|
Constructor Summary | |
---|---|
TestThreadLeak(Global glob,
java.lang.String testName)
|
Method Summary | |
---|---|
(package private) void |
dumpThreadStack()
|
(package private) void |
handleLock(TestThreadLeak.ConnectorWorker wr)
|
static void |
main(java.lang.String[] args)
Invoke: |
protected void |
setUp()
Sets up the fixture. |
static junit.framework.Test |
suite()
Method is used by TestRunner to load these tests |
void |
testThreadLeakage()
|
java.lang.String |
update(java.lang.String cbSessionId,
UpdateKey updateKey,
byte[] content,
UpdateQos updateQos)
This is the callback method invoked from xmlBlaster delivering us a new asynchronous message. |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString |
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static java.lang.String ME
private final Global glob
private static java.util.logging.Logger log
private java.lang.String fileName
private int noConnections
private boolean noError
private java.util.ArrayList connections
private int maxThreadDiff
private java.lang.String pid
private java.lang.String osName
private long cttl
Constructor Detail |
---|
public TestThreadLeak(Global glob, java.lang.String testName) throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
protected void setUp() throws java.lang.Exception
setUp
in class junit.framework.TestCase
java.lang.Exception
void dumpThreadStack() throws java.lang.Exception
java.lang.Exception
void handleLock(TestThreadLeak.ConnectorWorker wr) throws java.lang.Exception
java.lang.Exception
public void testThreadLeakage() throws java.lang.Exception
java.lang.Exception
public java.lang.String update(java.lang.String cbSessionId, UpdateKey updateKey, byte[] content, UpdateQos updateQos)
update
in interface I_Callback
cbSessionId
- The session ID specified by the client which registered the callback.
You can specify a cbSessionId during connection (with ConnectQos)
and this is bounced back here so you can authenticate the message.updateKey
- The arrived key containing the topic namecontent
- The arrived message content. This is your payload.I_Callback.update(String, UpdateKey,
byte[], UpdateQos)
public static junit.framework.Test suite() throws java.lang.Exception
java.lang.Exception
public static void main(java.lang.String[] args) throws java.lang.Exception
java org.xmlBlaster.test.mime.TestXPathSubscribeFilter java -Djava.compiler= junit.textui.TestRunner -noloading org.xmlBlaster.test.mime.TestXPathSubscribeFilter
java.lang.Exception
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |