summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/timeout/Client.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2018-06-01 17:41:03 +0200
committerJose <jose@zeroc.com>2018-06-01 17:41:03 +0200
commitcbe92e540a7f02f0bdf93192424bd119189365b7 (patch)
tree411c50dc0ae9c669d31a940b1b4903b5deac4f12 /cpp/test/Ice/timeout/Client.cpp
parentFixed Util.py check for binary installation directory on Windows (diff)
downloadice-cbe92e540a7f02f0bdf93192424bd119189365b7.tar.bz2
ice-cbe92e540a7f02f0bdf93192424bd119189365b7.tar.xz
ice-cbe92e540a7f02f0bdf93192424bd119189365b7.zip
Do not use Ice::Application for Ice testsuite
Diffstat (limited to 'cpp/test/Ice/timeout/Client.cpp')
-rw-r--r--cpp/test/Ice/timeout/Client.cpp78
1 files changed, 33 insertions, 45 deletions
diff --git a/cpp/test/Ice/timeout/Client.cpp b/cpp/test/Ice/timeout/Client.cpp
index 00414a2b16c..00968539885 100644
--- a/cpp/test/Ice/timeout/Client.cpp
+++ b/cpp/test/Ice/timeout/Client.cpp
@@ -8,64 +8,52 @@
// **********************************************************************
#include <Ice/Ice.h>
-#include <TestCommon.h>
+#include <TestHelper.h>
#include <Test.h>
-DEFINE_TEST("client")
-
using namespace std;
using namespace Test;
-int
-run(int, char**, const Ice::CommunicatorPtr& communicator)
+class Client : public Test::TestHelper
{
- void allTests(const Ice::CommunicatorPtr&);
- allTests(communicator);
- return EXIT_SUCCESS;
-}
+public:
-int
-main(int argc, char* argv[])
-{
-#ifdef ICE_STATIC_LIBS
- Ice::registerIceSSL(false);
- Ice::registerIceWS(true);
-#endif
+ void run(int, char**);
+};
- try
- {
- Ice::InitializationData initData = getTestInitData(argc, argv);
+void
+Client::run(int argc, char** argv)
+{
+ Ice::PropertiesPtr properties = createTestProperties(argc, argv);
- //
- // For this test, we want to disable retries.
- //
- initData.properties->setProperty("Ice.RetryIntervals", "-1");
+ //
+ // For this test, we want to disable retries.
+ //
+ properties->setProperty("Ice.RetryIntervals", "-1");
#if TARGET_OS_IPHONE != 0
- //
- // COMPILERFIX: Disable connect timeout introduced for
- // workaround to iOS device hangs when using SSL
- //
- initData.properties->setProperty("Ice.Override.ConnectTimeout", "");
+ //
+ // COMPILERFIX: Disable connect timeout introduced for
+ // workaround to iOS device hangs when using SSL
+ //
+ properties->setProperty("Ice.Override.ConnectTimeout", "");
#endif
- //
- // This test kills connections, so we don't want warnings.
- //
- initData.properties->setProperty("Ice.Warn.Connections", "0");
+ //
+ // This test kills connections, so we don't want warnings.
+ //
+ properties->setProperty("Ice.Warn.Connections", "0");
+
+ //
+ // Limit the send buffer size, this test relies on the socket
+ // send() blocking after sending a given amount of data.
+ //
+ properties->setProperty("Ice.TCP.SndSize", "50000");
- //
- // Limit the send buffer size, this test relies on the socket
- // send() blocking after sending a given amount of data.
- //
- initData.properties->setProperty("Ice.TCP.SndSize", "50000");
+ Ice::CommunicatorHolder communicator = initialize(argc, argv, properties);
- Ice::CommunicatorHolder ich(argc, argv, initData);
- return run(argc, argv, ich.communicator());
- }
- catch(const Ice::Exception& ex)
- {
- cerr << ex << endl;
- return EXIT_FAILURE;
- }
+ void allTests(Test::TestHelper*);
+ allTests(this);
}
+
+DEFINE_TEST(Client)