From: Chris Abbey <jikes@cabbey.net>
To: mauve-discuss@sources.redhat.com
Subject: Re: tests with rmic
Date: Tue, 18 Oct 2005 02:37:00 -0000 [thread overview]
Message-ID: <200510172137.28552.jikes@cabbey.net> (raw)
In-Reply-To: <4353DBB0.10807@menlina.com>
On Monday 17 October 2005 12:13, Nicolas Geoffray wrote:
> rmiregistry &
> jamvm ReceiveObjectImpl &
> jamvm Main
>
> Any suggestions?
Mauve style guidelines aside (because I have no idea what they would encourage
here), I'd encourage you not to start the default rmiregistry in any test
framework, as it creates a dependency on the runtime environment.
(Specifically that whoever is running the testcase doesn't already have an
rmi registry up.) Instead, I'd suggest that the ReceiveObjectImpl class binds
your own registry to an off the wall port that you've selected, and then in
the test case, you locate on that same port. This does create the problem
that you'll have to pick a port that's not in use, one solution to that is to
use a fallback pattern to select the port and write it to a file that the
test case loads to find out where the registry is. Also, by creating the
registry in the test server, you ensure that it goes away when the test is
done. The test server should also have a dead man's switch to exit after a
finite amount of time, otherwise you have to try to ensure some cleanup
externally, and most of the ways I've seen of doing that have some *bad* side
effects. (case in point at work, we have a few very large shared development
machines, occasionally, folks would get failures in some of the test buckets
they were running that just didn't make sense... further digging found a test
case like this that wanted to clean up after itself, so it did a ps list and
killed any task with it's name in it. This works fine as long as there is
only one instance of the test suite running. Another routinely killed the
snmpd on the system, because the test case fired up it's own with a unique
config, on the default port, and then when the test failed because it was
running iwht the wrong snmpd config, it blasted all instances of snmpd on the
box.) Anyway, client/server test cases usually need some extra thought put
into them was my only point before I started rambling.
/me re-lurks now.
--
Never make a technical decision based upon the politics of the situation.
Never make a political decision based upon technical issues.
The only place these realms meet is in the mind of the unenlightened.
-- Geoffrey James, The Zen of Programming
next prev parent reply other threads:[~2005-10-18 2:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-17 17:13 Nicolas Geoffray
2005-10-18 2:37 ` Chris Abbey [this message]
2005-10-18 8:41 ` tests with rmic! Meskauskas Audrius
2005-10-18 11:47 ` Nicolas Geoffray
2005-10-18 18:10 ` tests with rmic Meskauskas Audrius
2005-10-19 8:10 Nicolas Geoffray
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200510172137.28552.jikes@cabbey.net \
--to=jikes@cabbey.net \
--cc=mauve-discuss@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).