summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2018-06-21 09:20:02 +0200
committerBenoit Foucher <benoit@zeroc.com>2018-06-21 09:20:02 +0200
commit4bd01c81331ea7cd3f733a363c1be2ecd6805c85 (patch)
treee9b90e579f0dd659f84dced51dc48656bf5744d4 /cpp
parentFixed Android >= 8.0 SSL issue (fixes #105 (diff)
downloadice-4bd01c81331ea7cd3f733a363c1be2ecd6805c85.tar.bz2
ice-4bd01c81331ea7cd3f733a363c1be2ecd6805c85.tar.xz
ice-4bd01c81331ea7cd3f733a363c1be2ecd6805c85.zip
Test fixes and improvements for Android testing reliability
Diffstat (limited to 'cpp')
-rw-r--r--cpp/test/Ice/dispatcher/AllTests.cpp4
-rw-r--r--cpp/test/Ice/dispatcher/Client.cpp2
-rw-r--r--cpp/test/Ice/location/AllTests.cpp4
-rw-r--r--cpp/test/Ice/timeout/AllTests.cpp2
4 files changed, 7 insertions, 5 deletions
diff --git a/cpp/test/Ice/dispatcher/AllTests.cpp b/cpp/test/Ice/dispatcher/AllTests.cpp
index c153d535846..272ec7b3f20 100644
--- a/cpp/test/Ice/dispatcher/AllTests.cpp
+++ b/cpp/test/Ice/dispatcher/AllTests.cpp
@@ -175,7 +175,7 @@ allTests(Test::TestHelper* helper)
//
// Expect InvocationTimeoutException.
//
- auto to = p->ice_invocationTimeout(250);
+ auto to = p->ice_invocationTimeout(10);
to->sleepAsync(500,
[cb]()
{
@@ -250,7 +250,7 @@ allTests(Test::TestHelper* helper)
//
// Expect InvocationTimeoutException.
//
- Test::TestIntfPrx to = p->ice_invocationTimeout(250);
+ Test::TestIntfPrx to = p->ice_invocationTimeout(10);
to->begin_sleep(500, Test::newCallback_TestIntf_sleep(cb, &Callback::responseEx, &Callback::exceptionEx));
cb->check();
}
diff --git a/cpp/test/Ice/dispatcher/Client.cpp b/cpp/test/Ice/dispatcher/Client.cpp
index 62798c5f374..6767b901b9f 100644
--- a/cpp/test/Ice/dispatcher/Client.cpp
+++ b/cpp/test/Ice/dispatcher/Client.cpp
@@ -45,6 +45,8 @@ Client::run(int argc, char** argv)
void allTests(Test::TestHelper*);
allTests(this);
+
+ Dispatcher::terminate();
}
DEFINE_TEST(Client)
diff --git a/cpp/test/Ice/location/AllTests.cpp b/cpp/test/Ice/location/AllTests.cpp
index becce4b6e6d..2581d65e292 100644
--- a/cpp/test/Ice/location/AllTests.cpp
+++ b/cpp/test/Ice/location/AllTests.cpp
@@ -282,7 +282,7 @@ allTests(Test::TestHelper* helper, const string& ref)
test(++count == locator->getRequestCount());
basencc->ice_locatorCacheTimeout(0)->ice_ping(); // No locator cache.
test(++count == locator->getRequestCount());
- basencc->ice_locatorCacheTimeout(1)->ice_ping(); // 1s timeout.
+ basencc->ice_locatorCacheTimeout(2)->ice_ping(); // 2s timeout.
test(count == locator->getRequestCount());
IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(1300));
basencc->ice_locatorCacheTimeout(1)->ice_ping(); // 1s timeout.
@@ -291,7 +291,7 @@ allTests(Test::TestHelper* helper, const string& ref)
communicator->stringToProxy("test")->ice_locatorCacheTimeout(0)->ice_ping(); // No locator cache.
count += 2;
test(count == locator->getRequestCount());
- communicator->stringToProxy("test")->ice_locatorCacheTimeout(1)->ice_ping(); // 1s timeout
+ communicator->stringToProxy("test")->ice_locatorCacheTimeout(2)->ice_ping(); // 2s timeout
test(count == locator->getRequestCount());
IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(1300));
communicator->stringToProxy("test")->ice_locatorCacheTimeout(1)->ice_ping(); // 1s timeout
diff --git a/cpp/test/Ice/timeout/AllTests.cpp b/cpp/test/Ice/timeout/AllTests.cpp
index 7daff168666..a9787193bc1 100644
--- a/cpp/test/Ice/timeout/AllTests.cpp
+++ b/cpp/test/Ice/timeout/AllTests.cpp
@@ -472,7 +472,7 @@ allTests(Test::TestHelper* helper)
controller->holdAdapter(-1);
IceUtil::Time now = IceUtil::Time::now();
ich.release()->destroy();
- test(IceUtil::Time::now() - now < IceUtil::Time::milliSeconds(700));
+ test(IceUtil::Time::now() - now < IceUtil::Time::milliSeconds(1000));
controller->resumeAdapter();
timeout->op(); // Ensure adapter is active.
}