diff options
author | Benoit Foucher <benoit@zeroc.com> | 2008-05-27 20:21:02 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2008-06-06 12:25:26 +0200 |
commit | f92077c67c4d9329aba9f2455987d3d8ca632d17 (patch) | |
tree | d90aff63280048176b5fd561df2d6a06d63fe463 /java/test/Ice/operations/Twoways.java | |
parent | Fixed bug 3225 - Uninitialized attribute (diff) | |
download | ice-f92077c67c4d9329aba9f2455987d3d8ca632d17.tar.bz2 ice-f92077c67c4d9329aba9f2455987d3d8ca632d17.tar.xz ice-f92077c67c4d9329aba9f2455987d3d8ca632d17.zip |
- Fixed bug where first proxy request could incorrectly be sent compress or uncompressed.
- Added support to run the tests with valgrind on Linux (tested with valgrind
3.3.0).
Diffstat (limited to 'java/test/Ice/operations/Twoways.java')
-rw-r--r-- | java/test/Ice/operations/Twoways.java | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/java/test/Ice/operations/Twoways.java b/java/test/Ice/operations/Twoways.java index 7e1343f6195..4e962bb950a 100644 --- a/java/test/Ice/operations/Twoways.java +++ b/java/test/Ice/operations/Twoways.java @@ -18,6 +18,26 @@ class Twoways } } + static class PerThreadContextInvokeThread extends Thread + { + public PerThreadContextInvokeThread(Test.MyClassPrx proxy) + { + _proxy = proxy; + } + + public void + run() + { + java.util.Map<String, String> ctx = _proxy.ice_getCommunicator().getImplicitContext().getContext(); + test(ctx.isEmpty()); + ctx.put("one", "ONE"); + _proxy.ice_getCommunicator().getImplicitContext().setContext(ctx); + test(_proxy.opContext().equals(ctx)); + } + + final private Test.MyClassPrx _proxy; + } + static void twoways(Ice.Communicator communicator, Test.MyClassPrx p) { @@ -718,6 +738,20 @@ class Twoways test(ic.getImplicitContext().remove("one").equals("ONE")); + if(impls[i].equals("PerThread")) + { + Thread thread = new PerThreadContextInvokeThread( + Test.MyClassPrxHelper.uncheckedCast(p3.ice_context(null))); + thread.start(); + try + { + thread.join(); + } + catch(InterruptedException ex) + { + } + } + ic.destroy(); } } |