summaryrefslogtreecommitdiff
path: root/php/test
diff options
context:
space:
mode:
Diffstat (limited to 'php/test')
-rw-r--r--php/test/Ice/acm/Client.php13
-rw-r--r--php/test/Ice/acm/Test.ice1
2 files changed, 8 insertions, 6 deletions
diff --git a/php/test/Ice/acm/Client.php b/php/test/Ice/acm/Client.php
index e47e2dd6532..32ded1f8284 100644
--- a/php/test/Ice/acm/Client.php
+++ b/php/test/Ice/acm/Client.php
@@ -58,9 +58,8 @@ function allTests($communicator)
$NS ? constant("Ice\\ACMClose::CloseOnInvocationAndIdle") : constant("Ice_ACMClose::CloseOnInvocationAndIdle");
$HeartbeatOnIdle =
$NS ? constant("Ice\\ACMHeartbeat::HeartbeatOnIdle") : constant("Ice_ACMHeartbeat::HeartbeatOnIdle");
- $HeartbeatOnInvocation =
- $NS ? constant("Ice\\ACMHeartbeat::HeartbeatOnInvocation") :
- constant("Ice_ACMHeartbeat::HeartbeatOnInvocation");
+ $HeartbeatAlways =
+ $NS ? constant("Ice\\ACMHeartbeat::HeartbeatAlways") : constant("Ice_ACMHeartbeat::HeartbeatAlways");
$acm = $proxy->ice_getCachedConnection()->getACM();
test($acm->timeout == 15);
@@ -73,11 +72,13 @@ function allTests($communicator)
test($acm->close == $CloseOnIdleForceful);
test($acm->heartbeat == $HeartbeatOnIdle);
- $proxy->ice_getCachedConnection()->setACM(20, $CloseOnInvocationAndIdle, $HeartbeatOnInvocation);
+ $proxy->ice_getCachedConnection()->setACM(1, $CloseOnInvocationAndIdle, $HeartbeatAlways);
$acm = $proxy->ice_getCachedConnection()->getACM();
- test($acm->timeout == 20);
+ test($acm->timeout == 1);
test($acm->close == $CloseOnInvocationAndIdle);
- test($acm->heartbeat == $HeartbeatOnInvocation);
+ test($acm->heartbeat == $HeartbeatAlways);
+
+ $proxy->waitForHeartbeat(2);
$adapter->deactivate();
$testCommunicator->destroy();
diff --git a/php/test/Ice/acm/Test.ice b/php/test/Ice/acm/Test.ice
index b1c8b749109..0c4c3b105ca 100644
--- a/php/test/Ice/acm/Test.ice
+++ b/php/test/Ice/acm/Test.ice
@@ -17,6 +17,7 @@ interface TestIntf
void sleep(int seconds);
void sleepAndHold(int seconds);
void interruptSleep();
+ void waitForHeartbeat(int count);
};
interface RemoteObjectAdapter