}
@Test
public void testAccessTwoServersAtOnceReleaseTryAgain() throws Exception
{
BasicServer server1 = BasicServerHelper.narrow(orb.string_to_object(server1IOR));
assertEquals(10, server1.bounce_long(10));
BasicServer server2 = BasicServerHelper.narrow(orb.string_to_object(server2IOR));
try
{
server2.bounce_long(10);
fail("should fail as there may not be more than 1 ClientReceptorThreads");
}
catch (NO_RESOURCES e)
{
// expected
}
server1._release();
// give the ConsumerReceptorThread some time to finish its work
Thread.sleep(1000);
// retry bind
assertEquals(10, server2.bounce_long(10));
}