| |
|
| org.jgroups.tests.EncryptMessageOrderTestCase
EncryptMessageOrderTestCase | public class EncryptMessageOrderTestCase extends TestCase (Code) | | This test case checks ordering of messages using the Encrypt protocol
using UDP protocols. It can be run
as JUnit test case or in the command line. Parameters are:
-sleep n - means that after each message sending, sender
thread will sleep for n milliseconds;
-msg_num n - n is number of messages to send;
-debug - pop-up protocol debugger;
-cummulative - debugger shows cummulative messages.
$Id: EncryptMessageOrderTestCase.java,v 1.1.14.1 2007/04/26 21:32:06 vlada Exp $
|
Inner Class :public static class EncryptOrderTestHeader extends Header | |
Method Summary | |
static void | help() | public static void | main(String[] args) Main method to start a test case from the command line. | protected static void | printSelectedOptions() Print selected options before test starts. | protected void | setUp() Set up unit test. | protected void | tearDown() Tears down test case. | public void | testLoad() Test method. |
CUMMULATIVE | public static boolean CUMMULATIVE(Code) | | |
MESSAGE_NUMBER | public static int MESSAGE_NUMBER(Code) | | |
SLEEP_BETWEEN_SENDING | public static boolean SLEEP_BETWEEN_SENDING(Code) | | |
SLEEP_TIME | public static int SLEEP_TIME(Code) | | |
USE_DEBUGGER | public static boolean USE_DEBUGGER(Code) | | |
finishedReceiving | protected boolean finishedReceiving(Code) | | |
orderCounterFailure | boolean orderCounterFailure(Code) | | |
EncryptMessageOrderTestCase | public EncryptMessageOrderTestCase(String string)(Code) | | Constructor to create test case.
|
main | public static void main(String[] args)(Code) | | Main method to start a test case from the command line. Parameters are:
-sleep n - means that after each message sending, sender
thread will sleep for n milliseconds;
-msg_num n - n is number of messages to send;;
-debug - pop-up protocol debugger;
-cummulative - debugger shows cummulative messages.
|
printSelectedOptions | protected static void printSelectedOptions()(Code) | | Print selected options before test starts.
|
setUp | protected void setUp() throws Exception(Code) | | Set up unit test. It might add protocol
stack debuggers if such option was selected at startup.
|
tearDown | protected void tearDown() throws Exception(Code) | | Tears down test case. This method closes all opened channels.
|
testLoad | public void testLoad()(Code) | | Test method. This method adds a message listener to the PullPushAdapter
on channel 1, and starts sending specified number of messages into
channel 1 or 2 depending if we are in loopback mode or not. Each message
containg timestamp when it was created. By measuring time on message
delivery we can calculate message trip time. Listener is controlled by
two string messages "start" and "stop". After sender has finished to
send messages, it waits until listener receives all messages or "stop"
message. Then test is finished and calculations are showed.
Also we calculate how much memory
was allocated before excuting a test and after executing a test.
|
|
|
|