summaryrefslogtreecommitdiff
path: root/csharp/test
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/test')
-rw-r--r--csharp/test/Ice/dispatcher/AllTests.cs8
-rw-r--r--csharp/test/Ice/location/AllTests.cs8
-rw-r--r--csharp/test/Ice/timeout/AllTests.cs2
-rw-r--r--csharp/test/TestCommon/TestHelper.cs14
4 files changed, 17 insertions, 15 deletions
diff --git a/csharp/test/Ice/dispatcher/AllTests.cs b/csharp/test/Ice/dispatcher/AllTests.cs
index d6f1e193ad0..6a1214f6119 100644
--- a/csharp/test/Ice/dispatcher/AllTests.cs
+++ b/csharp/test/Ice/dispatcher/AllTests.cs
@@ -134,7 +134,7 @@ public class AllTests : Test.AllTests
// Expect InvocationTimeoutException.
//
{
- Test.TestIntfPrx to = Test.TestIntfPrxHelper.uncheckedCast(p.ice_invocationTimeout(250));
+ Test.TestIntfPrx to = Test.TestIntfPrxHelper.uncheckedCast(p.ice_invocationTimeout(10));
to.begin_sleep(500).whenCompleted(
() =>
{
@@ -199,7 +199,7 @@ public class AllTests : Test.AllTests
// Expect InvocationTimeoutException.
//
{
- Test.TestIntfPrx to = Test.TestIntfPrxHelper.uncheckedCast(p.ice_invocationTimeout(250));
+ Test.TestIntfPrx to = Test.TestIntfPrxHelper.uncheckedCast(p.ice_invocationTimeout(10));
to.sleepAsync(500).ContinueWith(
previous =>
{
@@ -232,7 +232,7 @@ public class AllTests : Test.AllTests
// Expect InvocationTimeoutException.
//
{
- Test.TestIntfPrx to = Test.TestIntfPrxHelper.uncheckedCast(p.ice_invocationTimeout(250));
+ Test.TestIntfPrx to = Test.TestIntfPrxHelper.uncheckedCast(p.ice_invocationTimeout(10));
to.sleepAsync(500).ContinueWith(
previous =>
{
@@ -306,7 +306,7 @@ public class AllTests : Test.AllTests
test(Dispatcher.isDispatcherThread());
}
- Test.TestIntfPrx to = Test.TestIntfPrxHelper.uncheckedCast(p.ice_invocationTimeout(250));
+ Test.TestIntfPrx to = Test.TestIntfPrxHelper.uncheckedCast(p.ice_invocationTimeout(10));
try
{
await to.sleepAsync(500);
diff --git a/csharp/test/Ice/location/AllTests.cs b/csharp/test/Ice/location/AllTests.cs
index de7792c8186..a870ea66997 100644
--- a/csharp/test/Ice/location/AllTests.cs
+++ b/csharp/test/Ice/location/AllTests.cs
@@ -225,18 +225,18 @@ public class AllTests : Test.AllTests
test(++count == locator.getRequestCount());
basencc.ice_locatorCacheTimeout(0).ice_ping(); // No locator cache.
test(++count == locator.getRequestCount());
- basencc.ice_locatorCacheTimeout(1).ice_ping(); // 1s timeout.
+ basencc.ice_locatorCacheTimeout(2).ice_ping(); // 2s timeout.
test(count == locator.getRequestCount());
- System.Threading.Thread.Sleep(1200); // 1200ms
+ System.Threading.Thread.Sleep(1300); // 1300ms
basencc.ice_locatorCacheTimeout(1).ice_ping(); // 1s timeout.
test(++count == locator.getRequestCount());
communicator.stringToProxy("test").ice_locatorCacheTimeout(0).ice_ping(); // No locator cache.
count += 2;
test(count == locator.getRequestCount());
- communicator.stringToProxy("test").ice_locatorCacheTimeout(1).ice_ping(); // 1s timeout
+ communicator.stringToProxy("test").ice_locatorCacheTimeout(2).ice_ping(); // 2s timeout
test(count == locator.getRequestCount());
- System.Threading.Thread.Sleep(1200); // 1200ms
+ System.Threading.Thread.Sleep(1300); // 1300ms
communicator.stringToProxy("test").ice_locatorCacheTimeout(1).ice_ping(); // 1s timeout
count += 2;
test(count == locator.getRequestCount());
diff --git a/csharp/test/Ice/timeout/AllTests.cs b/csharp/test/Ice/timeout/AllTests.cs
index 02898d654fe..b0cb49f3420 100644
--- a/csharp/test/Ice/timeout/AllTests.cs
+++ b/csharp/test/Ice/timeout/AllTests.cs
@@ -418,7 +418,7 @@ public class AllTests : Test.AllTests
controller.holdAdapter(-1);
long begin = System.DateTime.Now.Ticks;
comm.destroy();
- test(((long)new System.TimeSpan(System.DateTime.Now.Ticks - begin).TotalMilliseconds - begin) < 700);
+ test(((long)new System.TimeSpan(System.DateTime.Now.Ticks - begin).TotalMilliseconds - begin) < 1000);
controller.resumeAdapter();
}
WriteLine("ok");
diff --git a/csharp/test/TestCommon/TestHelper.cs b/csharp/test/TestCommon/TestHelper.cs
index d96d786bccc..fbba443e755 100644
--- a/csharp/test/TestCommon/TestHelper.cs
+++ b/csharp/test/TestCommon/TestHelper.cs
@@ -69,28 +69,30 @@ namespace Test
return properties;
}
- public Ice.Communicator initialize(ref string[] args, bool defaultCommunicator = true)
+ public Ice.Communicator initialize(ref string[] args)
{
Ice.InitializationData initData = new Ice.InitializationData();
initData.properties = createTestProperties(ref args);
- return initialize(initData, defaultCommunicator);
+ return initialize(initData);
}
- public Ice.Communicator initialize(Ice.Properties properties, bool defaultCommunicator = true)
+ public Ice.Communicator initialize(Ice.Properties properties)
{
Ice.InitializationData initData = new Ice.InitializationData();
initData.properties = properties;
- return initialize(initData, defaultCommunicator);
+ return initialize(initData);
}
- public Ice.Communicator initialize(Ice.InitializationData initData, bool defaultCommunicator = true)
+
+ public Ice.Communicator initialize(Ice.InitializationData initData)
{
Ice.Communicator communicator = Ice.Util.initialize(initData);
- if(defaultCommunicator)
+ if(_communicator == null)
{
_communicator = communicator;
}
return communicator;
}
+
public Ice.Communicator communicator()
{
return _communicator;