diff options
author | Benoit Foucher <benoit@zeroc.com> | 2013-07-04 11:20:07 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2013-07-04 11:20:07 +0200 |
commit | 0df052034b03907de02d8eac162e84e5ba50bfd5 (patch) | |
tree | f424142a198431b2a8981bfaebe79410ef4f5481 /php/test | |
parent | Fixed ICE-5340 - FileLock jlint errors in android (diff) | |
download | ice-0df052034b03907de02d8eac162e84e5ba50bfd5.tar.bz2 ice-0df052034b03907de02d8eac162e84e5ba50bfd5.tar.xz ice-0df052034b03907de02d8eac162e84e5ba50bfd5.zip |
Fixed ICE-5369 - fixed asserting on AMD response if memory limit exception was raised
Diffstat (limited to 'php/test')
-rw-r--r-- | php/test/Ice/exceptions/Client.php | 39 | ||||
-rw-r--r-- | php/test/Ice/exceptions/Test.ice | 3 |
2 files changed, 41 insertions, 1 deletions
diff --git a/php/test/Ice/exceptions/Client.php b/php/test/Ice/exceptions/Client.php index 401ffe95207..adf6b2ccdfb 100644 --- a/php/test/Ice/exceptions/Client.php +++ b/php/test/Ice/exceptions/Client.php @@ -271,6 +271,40 @@ function allTests($communicator) echo "ok\n"; } + { + echo "testing memory limit marshal exception..."; + flush(); + try + { + $thrower->throwMemoryLimitException(array(0x00)); + test(false); + } + catch(Exception $ex) + { + $uue = $NS ? "Ice\\UnknownLocalException" : "Ice_UnknownLocalException"; + if(!($ex instanceof $uue)) + { + throw $ex; + } + } + + try + { + $thrower->throwMemoryLimitException(array_pad(array(), 20 * 1024, 0x00)); + test(false); + } + catch(Exception $ex) + { + $uue = $NS ? "Ice\\MemoryLimitException" : "Ice_MemoryLimitException"; + if(!($ex instanceof $uue)) + { + throw $ex; + } + } + + echo "ok\n"; + } + echo "catching object not exist exception... "; flush(); @@ -393,7 +427,10 @@ function allTests($communicator) return $thrower; } -$communicator = Ice_initialize($argv); +$initData = new Ice_InitializationData; +$initData->properties = Ice_getProperties(); +$initData->properties->setProperty("Ice.MessageSizeMax", "10"); +$communicator = Ice_initialize($argv, $initData); $thrower = allTests($communicator); $thrower->shutdown(); $communicator->destroy(); diff --git a/php/test/Ice/exceptions/Test.ice b/php/test/Ice/exceptions/Test.ice index 93b72b57078..066ed4a9055 100644 --- a/php/test/Ice/exceptions/Test.ice +++ b/php/test/Ice/exceptions/Test.ice @@ -9,6 +9,8 @@ #pragma once +#include <Ice/BuiltinSequences.ice> + module Test { @@ -55,6 +57,7 @@ exception D void throwUndeclaredC(int a, int b, int c); void throwLocalException(); void throwNonIceException(); + Ice::ByteSeq throwMemoryLimitException(Ice::ByteSeq seq); idempotent void throwLocalExceptionIdempotent(); }; |