org.xmlBlaster.test.memoryleak
Class TestThreadLeak
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.xmlBlaster.test.memoryleak.TestThreadLeak
- All Implemented Interfaces:
- I_Callback, junit.framework.Test
- public class TestThreadLeak
- extends junit.framework.TestCase
- implements I_Callback
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.
- Version:
- $Revision: 1.4 $
- Author:
- Peter Antman
| Fields inherited from class junit.framework.TestCase |
|
| 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 |
ME
private static java.lang.String ME
glob
private final Global glob
log
private static java.util.logging.Logger log
fileName
private java.lang.String fileName
noConnections
private int noConnections
noError
private boolean noError
connections
private java.util.ArrayList connections
maxThreadDiff
private int maxThreadDiff
pid
private java.lang.String pid
osName
private java.lang.String osName
cttl
private long cttl
- Time a connection should live, before beeing taken down
TestThreadLeak
public TestThreadLeak(Global glob,
java.lang.String testName)
throws java.lang.Exception
setUp
protected void setUp()
throws java.lang.Exception
- Sets up the fixture.
- Throws:
java.lang.Exception
dumpThreadStack
void dumpThreadStack()
throws java.lang.Exception
- Throws:
java.lang.Exception
handleLock
void handleLock(TestThreadLeak.ConnectorWorker wr)
throws java.lang.Exception
- Throws:
java.lang.Exception
testThreadLeakage
public void testThreadLeakage()
throws java.lang.Exception
- Throws:
java.lang.Exception
update
public 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.
- Specified by:
update in interface I_Callback
- Parameters:
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.- See Also:
I_Callback.update(String, UpdateKey,
byte[], UpdateQos)
suite
public static junit.framework.Test suite()
throws java.lang.Exception
- Method is used by TestRunner to load these tests
- Throws:
java.lang.Exception
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Invoke:
java org.xmlBlaster.test.mime.TestXPathSubscribeFilter
java -Djava.compiler= junit.textui.TestRunner -noloading
org.xmlBlaster.test.mime.TestXPathSubscribeFilter
- Throws:
java.lang.Exception
Copyright © 1999-2007 The xmlBlaster.org contributers.