diff options
author | Jose <pepone@users.noreply.github.com> | 2024-02-01 10:05:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-01 10:05:06 +0100 |
commit | 49f99d1dcc042a800840e1814b6a3a5f24c1ebb4 (patch) | |
tree | 72ca0725ecd2eea99de91a90f9888ebbed120534 /cpp/test/Ice/invoke/AllTests.cpp | |
parent | Remove dead code from Python extension (#1732) (diff) | |
download | ice-49f99d1dcc042a800840e1814b6a3a5f24c1ebb4.tar.bz2 ice-49f99d1dcc042a800840e1814b6a3a5f24c1ebb4.tar.xz ice-49f99d1dcc042a800840e1814b6a3a5f24c1ebb4.zip |
Fix ice_invoke and ice_invokeAsync to handle empty result buffer (#1733)
Diffstat (limited to 'cpp/test/Ice/invoke/AllTests.cpp')
-rw-r--r-- | cpp/test/Ice/invoke/AllTests.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/cpp/test/Ice/invoke/AllTests.cpp b/cpp/test/Ice/invoke/AllTests.cpp index 66058b20230..d615ffb37a8 100644 --- a/cpp/test/Ice/invoke/AllTests.cpp +++ b/cpp/test/Ice/invoke/AllTests.cpp @@ -380,6 +380,14 @@ allTests(Test::TestHelper* helper) } } + { + // Oneway operation with a oneway proxy must return empty encapsulation. + Ice::ByteSeq inEncaps, outEncaps; + bool returnValue = oneway->ice_invoke("opOneway", Ice::ICE_ENUM(OperationMode, Normal), inEncaps, outEncaps); + test(returnValue); + test(outEncaps.size() == 0); // Empty encapsulation + } + cout << "ok" << endl; cout << "testing asynchronous ice_invoke... " << flush; @@ -439,9 +447,20 @@ allTests(Test::TestHelper* helper) // { + // Oneway operation with a oneway proxy must return empty encapsulation. Ice::ByteSeq inEncaps, outEncaps; + bool returnValue = oneway->ice_invoke("opOneway", Ice::OperationMode::Normal, inEncaps, outEncaps); + test(returnValue); + test(outEncaps.size() == 0); // Empty encapsulation + } + + { + // Oneway operation with a oneway proxy must return empty encapsulation. + Ice::ByteSeq inEncaps; auto completed = oneway->ice_invokeAsync("opOneway", Ice::OperationMode::Normal, inEncaps); - test(completed.get().returnValue); + auto result = completed.get(); + test(result.returnValue); + test(result.outParams.size() == 0); // Empty encapsulation } { @@ -646,6 +665,8 @@ allTests(Test::TestHelper* helper) { test(false); } + test(result); + test(outEncaps.size() == 0); // Empty encapsulation Ice::OutputStream out(communicator); out.startEncapsulation(); |