summaryrefslogtreecommitdiff
path: root/cpp/test
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2022-07-13 15:16:40 +0200
committerJose <jose@zeroc.com>2022-07-13 15:18:06 +0200
commit1b60e5f54447946248f9ea74e0759e63efa24be2 (patch)
treec96ea2ca9f051a26cc3ffc1c843aa04b268220bd /cpp/test
parentFix python version check (#1381) (diff)
downloadice-1b60e5f54447946248f9ea74e0759e63efa24be2.tar.bz2
ice-1b60e5f54447946248f9ea74e0759e63efa24be2.tar.xz
ice-1b60e5f54447946248f9ea74e0759e63efa24be2.zip
Disable FD limit test, this test has many false positives
Diffstat (limited to 'cpp/test')
-rw-r--r--cpp/test/Ice/binding/AllTests.cpp77
1 files changed, 0 insertions, 77 deletions
diff --git a/cpp/test/Ice/binding/AllTests.cpp b/cpp/test/Ice/binding/AllTests.cpp
index 67c1e42ac0c..356f929b10d 100644
--- a/cpp/test/Ice/binding/AllTests.cpp
+++ b/cpp/test/Ice/binding/AllTests.cpp
@@ -1027,82 +1027,5 @@ allTests(Test::TestHelper* helper)
cout << "ok" << endl;
}
-
- //
- // On Windows, the FD limit is very high and there's no way to limit the number of FDs
- // for the server so we don't run this test.
- //
-#if !defined(_WIN32) && (!defined(__APPLE__) || TARGET_OS_IPHONE == 0)
- {
- cout << "testing FD limit... " << flush;
-
- RemoteObjectAdapterPrxPtr adapter = com->createObjectAdapter("Adapter", "default");
-
- TestIntfPrxPtr test = adapter->getTestIntf();
- int i = 0;
- while(true)
- {
- try
- {
- ostringstream os;
- os << i;
- test->ice_connectionId(os.str())->ice_ping();
- ++i;
- }
- catch(const Ice::LocalException&)
- {
- break;
- }
- }
-
- try
- {
- ostringstream os;
- os << i;
- test->ice_connectionId(os.str())->ice_ping();
- test(false);
- }
- catch(const Ice::ConnectionRefusedException&)
- {
- // Close the connection now to free a FD (it could be done after the sleep but
- // there could be race condition since the connection might not be closed
- // immediately due to threading).
- test->ice_connectionId("0")->ice_getConnection()->close(
- Ice::ICE_SCOPED_ENUM(ConnectionClose, GracefullyWithWait));
-
- //
- // The server closed the acceptor, wait one second and retry after freeing a FD.
- //
- IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(1100));
- int nRetry = 10;
- bool success = false;
- while(--nRetry > 0)
- {
- try
- {
- ostringstream os;
- os << i;
- test->ice_connectionId(os.str())->ice_ping();
- success = true;
- break;
- }
- catch(const Ice::LocalException&)
- {
- }
- IceUtil::ThreadControl::sleep(IceUtil::Time::milliSeconds(100));
- }
- test(success);
- }
- catch(const Ice::LocalException&)
- {
- // The server didn't close the acceptor but we still get a failure (it's possible
- // that the client reached the FD limit depending on the server we are running
- // against...).
- }
-
- cout << "ok" << endl;
- }
-#endif
-
com->shutdown();
}