tests/auto/qftp/tst_qftp.cpp
changeset 22 79de32ba3296
parent 19 fcece45ef507
--- a/tests/auto/qftp/tst_qftp.cpp	Mon May 03 13:17:34 2010 +0300
+++ b/tests/auto/qftp/tst_qftp.cpp	Fri May 14 16:40:13 2010 +0300
@@ -123,6 +123,8 @@
     void doneSignal();
     void queueMoreCommandsInDoneSlot();
 
+    void qtbug7359Crash();
+
 protected slots:
     void stateChanged( int );
     void listInfo( const QUrlInfo & );
@@ -2052,6 +2054,30 @@
     }
 }
 
+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"