summaryrefslogtreecommitdiff
path: root/csharp/test
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2016-01-05 11:56:55 +0100
committerBenoit Foucher <benoit@zeroc.com>2016-01-05 11:56:55 +0100
commit22403a2ad0d8921df9f4ec06f2571d251dbae3a6 (patch)
treef221ed8fd97017bc9afe13ac8bad62f1d7dfb5c2 /csharp/test
parentTravis cleanup (diff)
downloadice-22403a2ad0d8921df9f4ec06f2571d251dbae3a6.tar.bz2
ice-22403a2ad0d8921df9f4ec06f2571d251dbae3a6.tar.xz
ice-22403a2ad0d8921df9f4ec06f2571d251dbae3a6.zip
Fixed potential deadlock that could occur with Ice for C++ when using collocation optimization and serialization
Diffstat (limited to 'csharp/test')
-rw-r--r--csharp/test/Ice/adapterDeactivation/AllTests.cs1
-rw-r--r--csharp/test/Ice/adapterDeactivation/Collocated.cs10
2 files changed, 9 insertions, 2 deletions
diff --git a/csharp/test/Ice/adapterDeactivation/AllTests.cs b/csharp/test/Ice/adapterDeactivation/AllTests.cs
index 833faf409f5..cd325c348f8 100644
--- a/csharp/test/Ice/adapterDeactivation/AllTests.cs
+++ b/csharp/test/Ice/adapterDeactivation/AllTests.cs
@@ -73,6 +73,7 @@ public class AllTests : TestCommon.TestApp
Write("creating/activating/deactivating object adapter in one operation... ");
Flush();
obj.transient();
+ obj.end_transient(obj.begin_transient());
WriteLine("ok");
{
diff --git a/csharp/test/Ice/adapterDeactivation/Collocated.cs b/csharp/test/Ice/adapterDeactivation/Collocated.cs
index f607c1a4954..d0ca641129d 100644
--- a/csharp/test/Ice/adapterDeactivation/Collocated.cs
+++ b/csharp/test/Ice/adapterDeactivation/Collocated.cs
@@ -25,17 +25,23 @@ public class Collocated
public override int run(string[] args)
{
communicator().getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010");
+
+ //
+ // 2 threads are necessary to dispatch the collocated transient() call with AMI
+ //
+ communicator().getProperties().setProperty("TestAdapter.ThreadPool.Size", "2");
+
Ice.ObjectAdapter adapter = communicator().createObjectAdapter("TestAdapter");
Ice.ServantLocator locator = new ServantLocatorI();
adapter.addServantLocator(locator, "");
AllTests.allTests(communicator());
-
+
adapter.waitForDeactivate();
return 0;
}
}
-
+
public static int Main(string[] args)
{
App app = new App();