Unit testing RMI Servers
David Whyte <[email protected]>
| Newsgroups | gmane.comp.java.sun.rmi |
|---|---|
| Message-ID | <[email protected]> |
Howdy, I am trying to unit test an RMI server as part of a sanity check. Currently, I test the server interface by creating a new instance of the object in the same JVM as our JUnits run, however, I am looking at a way of creating a new process and running the RMI server in that. Rather than re-invent the wheel, I am looking to see if this has been done before. I imagine that many people wish to do the same thing or have tried the same thing in the past. Basically, what I want to do is have some kind of flag, which is tested as part of a Junit setup method. If we are running against a local server interface (in the same JVM), the setup will progress as normal, however, if we are wanting to run against a remote server interface (in a different JVM), we should spawn a process which is the RMI server. In the tear down we will either de-reference the object or terminate the process as appropriate for the scenario. Can anyone advise of any previous work that may have been done to make this kind of test a little easier. I don't mind doing it the long way I have outlined above, but if there is a neater way to go about it, bring it on ;) Cheers, Whytey -- -- GMAIL is 'da bomb baby....YEAH I have GMail invites, if you want one, email me direct. =========================================================================== To unsubscribe, send email to [email protected] and include in the body of the message "signoff RMI-USERS". For general help, send email to [email protected] and include in the body of the message "help". For a list of frequently asked RMI questions please refer to: http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html To view past RMI-USERS postings, please see: http://archives.java.sun.com/archives/rmi-users.html