| java.lang.Object com.sun.midp.i3test.TestCase com.sun.midp.links.TestMultiple
TestMultiple | public class TestMultiple extends TestCase (Code) | | Tests multiple receiving or sending threads blocked on the same link.
|
Inner Class :class LoggingReceiver extends Receiver | |
Inner Class :class LoggingSender extends Sender | |
NUM_THREADS | final public static int NUM_THREADS(Code) | | The number of senders or receivers.
|
TIMEOUT | final public static long TIMEOUT(Code) | | Amount of time to wait for threads to complete after sending or
receiving a message.
|
completed | public void completed(Thread thr, LinkMessage msg, Throwable exc)(Code) | | Common code for completion callbacks for LoggingReceiver and
LoggingSender. Adds the thread to the done set; if non-null, adds msg
to the map of received messages; if non-null, adds any throwables
caught to the map of caught throwables.
|
testReceivers | void testReceivers() throws IOException(Code) | | Tests multiple receivers blocked on the same link. Creates NUM_THREADS
threads to receive messages. Then, sends messages one by one, and
ensures that each time exactly one thread is unblocked and has received
the message just sent. Finally, after sending enough messages, ensures
that all threads have been accounted for.
|
testSenders | void testSenders() throws IOException(Code) | | Tests multiple senders blocked on the same link. Creates NUM_THREADS
threads to send messages. Then, receives messages one by one, and
ensures that each time exactly one thread is unblocked and had sent the
message just received. Finally, after receiving enough messages,
ensures that all threads have been accounted for.
|
Methods inherited from com.sun.midp.i3test.TestCase | public void assertEquals(Object expected, Object actual)(Code)(Java Doc) public void assertEquals(String message, Object expected, Object actual)(Code)(Java Doc) public void assertEquals(int expected, int actual)(Code)(Java Doc) public void assertEquals(String message, int expected, int actual)(Code)(Java Doc) public void assertFalse(boolean condition)(Code)(Java Doc) public void assertFalse(String message, boolean condition)(Code)(Java Doc) public void assertNotNull(Object object)(Code)(Java Doc) public void assertNotNull(String message, Object object)(Code)(Java Doc) public void assertNotSame(Object expected, Object actual)(Code)(Java Doc) public void assertNotSame(String message, Object expected, Object actual)(Code)(Java Doc) public void assertNull(Object object)(Code)(Java Doc) public void assertNull(String message, Object object)(Code)(Java Doc) public void assertSame(Object expected, Object actual)(Code)(Java Doc) public void assertSame(String message, Object expected, Object actual)(Code)(Java Doc) public void assertTrue(String message, boolean condition)(Code)(Java Doc) public void assertTrue(boolean condition)(Code)(Java Doc) public void declare(String testName)(Code)(Java Doc) public void fail()(Code)(Java Doc) public void fail(String message)(Code)(Java Doc) protected SecurityToken getSecurityToken()(Code)(Java Doc) protected boolean getVerbose()(Code)(Java Doc) public void info(String s)(Code)(Java Doc) abstract public void runTests() throws Throwable(Code)(Java Doc)
|
|
|