Home > Archive > Ruby > August 2005 > unit testing DRb server
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
unit testing DRb server
|
|
| Joe Van Dyk 2005-08-29, 9:57 pm |
| Hi,
I'm trying to test a class that starts a DRb server. I have a stop
method in the class that does a @drb_thread.kill. But when I try to
start the DRb server up again, it's throwing an exception:=20
#<Errno::EADDRINUSE: Address already in use - bind(2)>
Any way around that? Do I need to wait a couple seconds between each
run for the port to clear up?
| |
| Eric Hodel 2005-08-29, 9:57 pm |
|
On 29 Aug 2005, at 17:35, Joe Van Dyk wrote:
> Hi,
>
> I'm trying to test a class that starts a DRb server. I have a stop
> method in the class that does a @drb_thread.kill. But when I try to
> start the DRb server up again, it's throwing an exception:
> #<Errno::EADDRINUSE: Address already in use - bind(2)>
>
> Any way around that? Do I need to wait a couple seconds between each
> run for the port to clear up?
Do you really need to test it via DRb? Why not just call the methods
on the front object the regular way and have a single separate test
that makes sure the DRb service gets started correctly?
--
Eric Hodel - drbrain@segment7.net - http://segment7.net
FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04
| |
| Joe Van Dyk 2005-08-30, 3:57 am |
| On 8/29/05, Eric Hodel <drbrain@segment7.net> wrote:
>=20
> On 29 Aug 2005, at 17:35, Joe Van Dyk wrote:
>=20
>=20
> Do you really need to test it via DRb? Why not just call the methods
> on the front object the regular way and have a single separate test
> that makes sure the DRb service gets started correctly?
I guess I could do that.
What I'm trying to do is have have DRb servers running on multiple
computers that will start and kill applications, and have another
application that is able to ask that manages all the other computers.
|
|
|
|
|