|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--info.jedi.testsuite.Client
This class is designed to test the parts.basic package and several classes that this package depends on. It is run from the command line with the following syntax:
java info.jedi.testsuite.Client <server address> [<number of messages>]The address is that of a machine where the Server class is running (run with java Server) The number of messages is an optional argument for testing reliability with many, many message sends (it has been tested successfully with 1,000,000 messages as this argument).
Only one client can properly test a single server at a time; not following this rule may result in test failure or even a VM crash.
Constructor Summary | |
Client(java.lang.String serverAddress,
int serverPort,
int numMessages)
Creates a Client object that will test a server identified by its address and port and will send a certain number of simple messages in the process. |
Method Summary | |
void |
bounceFunction(Proxy next,
int bouncesLeft)
Recursively bounces a call between client and server, passing a Proxy representing this object and an ever decreasing index of how many recursive calls are left. |
static void |
main(java.lang.String[] args)
Handles command line invocations of the client side of the test suite. |
boolean |
runBaseTests()
Runs the basic communication tests that try to send global method calls with different parameters. |
boolean |
runCountTests()
Runs the counting tests. |
boolean |
runExceptionTests()
Runs tests designed to fail in different ways. |
boolean |
runProxyTests()
Uses the bounceFunction to bounce a call back and forth between the client and server 100 times. |
boolean |
runSemaphoreTests()
Runs the semaphore tests, where 100 remote functions are called simultaneously, and all calls block until the 100th call has been received. |
boolean |
runTests()
Runs all the tests in the suite, printing success or failure after all tests have been run. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Client(java.lang.String serverAddress, int serverPort, int numMessages) throws java.lang.Exception
Method Detail |
public boolean runBaseTests() throws java.lang.Exception
public boolean runSemaphoreTests()
public boolean runCountTests() throws java.lang.Exception
public void bounceFunction(Proxy next, int bouncesLeft) throws java.lang.Exception
public boolean runProxyTests()
public boolean runExceptionTests()
public boolean runTests() throws java.lang.Exception
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |