summaryrefslogtreecommitdiff
path: root/csharp/test
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/test')
-rw-r--r--csharp/test/Ice/ami/AllTests.cs13
1 files changed, 9 insertions, 4 deletions
diff --git a/csharp/test/Ice/ami/AllTests.cs b/csharp/test/Ice/ami/AllTests.cs
index dd91682ff69..0a515a0b2e9 100644
--- a/csharp/test/Ice/ami/AllTests.cs
+++ b/csharp/test/Ice/ami/AllTests.cs
@@ -3439,8 +3439,10 @@ public class AllTests : TestCommon.AllTests
// This test requires two threads in the server's thread pool: one will block in sleep() and the other
// will process the CloseConnection message.
//
+ p.ice_ping();
+ Ice.Connection con = p.ice_getConnection();
Task t = p.sleepAsync(100);
- p.ice_getConnection().close(Ice.ConnectionClose.CloseGracefully);
+ con.close(Ice.ConnectionClose.CloseGracefully);
try
{
t.Wait();
@@ -3458,7 +3460,8 @@ public class AllTests : TestCommon.AllTests
// despite the fact that there's a pending call to sleep(). The call to sleep() should be
// automatically retried and complete successfully.
//
- Ice.Connection con = p.ice_getConnection();
+ p.ice_ping();
+ con = p.ice_getConnection();
CallbackBase cb = new CallbackBase();
con.setCloseCallback(_ =>
{
@@ -3480,8 +3483,10 @@ public class AllTests : TestCommon.AllTests
// Local case: start a lengthy operation and then close the connection forcefully on the client side.
// There will be no retry and we expect the invocation to fail with ConnectionManuallyClosedException.
//
- Task t = p.sleepAsync(100);
- p.ice_getConnection().close(Ice.ConnectionClose.CloseForcefully);
+ p.ice_ping();
+ Ice.Connection con = p.ice_getConnection();
+ Task t = p.sleepAsync(5000);
+ con.close(Ice.ConnectionClose.CloseForcefully);
try
{
t.Wait();