diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-03-03 14:10:40 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-03-03 14:10:40 +0000 |
commit | e642c24a430dc350b3b14b5a925376084f8a7602 (patch) | |
tree | c494bf31e6c52a327e46a47e4fdf0e98872c6784 /cppe/test/IceE/retry/Client.cpp | |
parent | Fix (diff) | |
download | ice-e642c24a430dc350b3b14b5a925376084f8a7602.tar.bz2 ice-e642c24a430dc350b3b14b5a925376084f8a7602.tar.xz ice-e642c24a430dc350b3b14b5a925376084f8a7602.zip |
Ported fix for bug 574 and retry test
Diffstat (limited to 'cppe/test/IceE/retry/Client.cpp')
-rw-r--r-- | cppe/test/IceE/retry/Client.cpp | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/cppe/test/IceE/retry/Client.cpp b/cppe/test/IceE/retry/Client.cpp new file mode 100644 index 00000000000..2f40ceb4ece --- /dev/null +++ b/cppe/test/IceE/retry/Client.cpp @@ -0,0 +1,72 @@ +// ********************************************************************** +// +// Copyright (c) 2003-2006 ZeroC, Inc. All rights reserved. +// +// This copy of Ice-E is licensed to you under the terms described in the +// ICEE_LICENSE file included in this distribution. +// +// ********************************************************************** + +#include <IceE/IceE.h> +#include <TestCommon.h> +#include <TestApplication.h> +#include <Test.h> + +using namespace std; + +class RetryTestApplication : public TestApplication +{ +public: + + RetryTestApplication() : + TestApplication("retry client") + { + } + + virtual int + run(int argc, char* argv[]) + { + Ice::PropertiesPtr properties = Ice::createProperties(); + //properties->setProperty("Ice.Trace.Network", "5"); + //properties->setProperty("Ice.Trace.Protocol", "5"); + + loadConfig(properties); + + // + // For this test, we want to disable retries. + // + properties->setProperty("Ice.RetryIntervals", "-1"); + + setCommunicator(Ice::initializeWithProperties(argc, argv, properties)); + + // + // This test kills connections, so we don't want warnings. + // + properties->setProperty("Ice.Warn.Connections", "0"); + + Test::RetryPrx allTests(const Ice::CommunicatorPtr&); + Test::RetryPrx retry = allTests(communicator()); + retry->shutdown(); + return EXIT_SUCCESS; + } +}; + +#ifdef _WIN32_WCE + +int WINAPI +WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) +{ + RetryTestApplication app; + return app.main(hInstance); +} + +#else + +int +main(int argc, char** argv) +{ + RetryTestApplication app; + return app.main(argc, argv); +} + +#endif |