示例#1
0
 public override void RunTestCase(Test.IRemoteObjectAdapterPrx adapter, Test.ITestIntfPrx proxy)
 {
     try
     {
         // When the OA is put on hold, connections shouldn't
         // send heartbeats, the invocation should therefore
         // fail.
         proxy.sleepAndHold(10);
         test(false);
     }
     catch (Ice.ConnectionTimeoutException)
     {
         adapter.activate();
         proxy.interruptSleep();
         waitForClosed();
     }
 }
示例#2
0
            public override void RunTestCase(Test.IRemoteObjectAdapterPrx adapter, Test.ITestIntfPrx proxy)
            {
                //
                // Put the adapter on hold. The server will not respond to
                // the graceful close. This allows to test whether or not
                // the close is graceful or forceful.
                //
                adapter.hold();
                Thread.Sleep(5000); // Idle for 5 seconds

                lock (this)
                {
                    test(_heartbeat == 0);
                    test(!_closed); // Not closed yet because of graceful close.
                }

                adapter.activate();
                waitForClosed();
            }