summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2010-04-13 14:46:58 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2010-04-13 14:46:58 (GMT)
commita8094876e3c1194262b13313eee92cff3c0a0021 (patch)
tree2eb3cc62e169c7dba35ad084b6501e538a56e3e6 /tests
parent34cb9b282b14ba01df7266bdb3649a3e43ddd9f4 (diff)
downloadQt-a8094876e3c1194262b13313eee92cff3c0a0021.zip
Qt-a8094876e3c1194262b13313eee92cff3c0a0021.tar.gz
Qt-a8094876e3c1194262b13313eee92cff3c0a0021.tar.bz2
tst_qftp: Attempting to reproduce a crash
Task-number: QTBUG-7359
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qftp/tst_qftp.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/auto/qftp/tst_qftp.cpp b/tests/auto/qftp/tst_qftp.cpp
index 638c810..2a42d6d 100644
--- a/tests/auto/qftp/tst_qftp.cpp
+++ b/tests/auto/qftp/tst_qftp.cpp
@@ -123,6 +123,8 @@ private slots:
void doneSignal();
void queueMoreCommandsInDoneSlot();
+ void qtbug7359Crash();
+
protected slots:
void stateChanged( int );
void listInfo( const QUrlInfo & );
@@ -2052,6 +2054,30 @@ void tst_QFtp::cdUpSlot(bool error)
}
}
+void tst_QFtp::qtbug7359Crash()
+{
+ QFtp ftp;
+ ftp.connectToHost("127.0.0.1");
+
+ QTime t;
+ int elapsed;
+
+ t.start();
+ while ((elapsed = t.elapsed()) < 200)
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 200 - elapsed);
+
+ ftp.close();
+ t.restart();
+ while ((elapsed = t.elapsed()) < 1000)
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000 - elapsed);
+
+ ftp.connectToHost("127.0.0.1");
+
+ t.restart();
+ while ((elapsed = t.elapsed()) < 2000)
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 2000 - elapsed);
+}
+
QTEST_MAIN(tst_QFtp)
#include "tst_qftp.moc"