summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtcpsocket
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2011-03-08 13:20:40 (GMT)
committerShane Kearns <shane.kearns@accenture.com>2011-03-09 13:15:12 (GMT)
commita99cc33345c32a7e210dbffa2c5c56ee13dd83c1 (patch)
tree1d8b79f85eef1f29df4b1e0cfd11cd3ca8943329 /tests/auto/qtcpsocket
parent81ab8365e53389936bcaff07c82a2891ec63c4e5 (diff)
downloadQt-a99cc33345c32a7e210dbffa2c5c56ee13dd83c1.zip
Qt-a99cc33345c32a7e210dbffa2c5c56ee13dd83c1.tar.gz
Qt-a99cc33345c32a7e210dbffa2c5c56ee13dd83c1.tar.bz2
tst_qtcpsocket stabilisation
Increased heap size to avoid OOM Increased timeouts in the timeoutConnect test, as these randomly fail at least in debug builds with 50ms (symbian threads have a 20ms timeslice for round robin scheduling of equal priority threads, so that could be related) Skip the setSocketDescriptor test on symbian, since native sockets are not ints, open c sockets are not supported, and we decided not to support RSocket adoption unless it's specifically requested. Reviewed-by: Markus Goetz
Diffstat (limited to 'tests/auto/qtcpsocket')
-rw-r--r--tests/auto/qtcpsocket/test/test.pro2
-rw-r--r--tests/auto/qtcpsocket/tst_qtcpsocket.cpp8
2 files changed, 7 insertions, 3 deletions
diff --git a/tests/auto/qtcpsocket/test/test.pro b/tests/auto/qtcpsocket/test/test.pro
index c4369df..5dde565 100644
--- a/tests/auto/qtcpsocket/test/test.pro
+++ b/tests/auto/qtcpsocket/test/test.pro
@@ -11,7 +11,7 @@ wince*: {
QT += network
vxworks:QT -= gui
-symbian: TARGET.EPOCHEAPSIZE="0x100 0x1000000"
+symbian: TARGET.EPOCHEAPSIZE="0x100 0x3000000"
TARGET = tst_qtcpsocket
diff --git a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
index 40ca531..b21de49 100644
--- a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
@@ -445,6 +445,9 @@ void tst_QTcpSocket::setInvalidSocketDescriptor()
void tst_QTcpSocket::setSocketDescriptor()
{
+#ifdef Q_OS_SYMBIAN
+ QSKIP("adopting open c socket handles is not supported", SkipAll);
+#else
QFETCH_GLOBAL(bool, setProxy);
if (setProxy)
return; // this test doesn't make sense with proxies
@@ -485,6 +488,7 @@ void tst_QTcpSocket::setSocketDescriptor()
#ifdef Q_OS_WIN
delete dummy;
#endif
+#endif
}
//----------------------------------------------------------------------------------
@@ -607,14 +611,14 @@ void tst_QTcpSocket::timeoutConnect()
// Port 1357 is configured to drop packets on the test server
socket->connectToHost(address, 1357);
- QVERIFY(timer.elapsed() < 50);
+ QVERIFY(timer.elapsed() < 150);
QVERIFY(!socket->waitForConnected(1000)); //200ms is too short when using SOCKS proxy authentication
QCOMPARE(socket->state(), QTcpSocket::UnconnectedState);
QCOMPARE(int(socket->error()), int(QTcpSocket::SocketTimeoutError));
timer.start();
socket->connectToHost(address, 1357);
- QVERIFY(timer.elapsed() < 50);
+ QVERIFY(timer.elapsed() < 150);
QTimer::singleShot(50, &QTestEventLoop::instance(), SLOT(exitLoop()));
QTestEventLoop::instance().enterLoop(5);
QVERIFY(!QTestEventLoop::instance().timeout());