diff options
Diffstat (limited to 'csharp/test/Ice/acm/AllTests.cs')
-rw-r--r-- | csharp/test/Ice/acm/AllTests.cs | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/csharp/test/Ice/acm/AllTests.cs b/csharp/test/Ice/acm/AllTests.cs index 0689d836f26..307a211ebe8 100644 --- a/csharp/test/Ice/acm/AllTests.cs +++ b/csharp/test/Ice/acm/AllTests.cs @@ -107,7 +107,7 @@ class LoggerI : Ice.Logger private List<string> _messages = new List<string>(); }; -abstract class TestCase : Ice.ConnectionCallback +abstract class TestCase { public TestCase(string name, RemoteCommunicatorPrx com) { @@ -187,7 +187,23 @@ abstract class TestCase : Ice.ConnectionCallback _adapter.getTestIntf().ToString())); try { - proxy.ice_getConnection().setCallback(this); + proxy.ice_getConnection().setCloseCallback(_=> + { + lock(this) + { + _closed = true; + Monitor.Pulse(this); + } + }); + + proxy.ice_getConnection().setHeartbeatCallback(_=> + { + lock(this) + { + ++_heartbeat; + } + }); + runTestCase(_adapter, proxy); } catch(Exception ex) @@ -196,23 +212,6 @@ abstract class TestCase : Ice.ConnectionCallback } } - public void heartbeat(Ice.Connection con) - { - lock(this) - { - ++_heartbeat; - } - } - - public void closed(Ice.Connection con) - { - lock(this) - { - _closed = true; - Monitor.Pulse(this); - } - } - public void waitForClosed() { lock(this) |