tests/auto/qftp/tst_qftp.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
--- a/tests/auto/qftp/tst_qftp.cpp	Tue Jan 26 12:42:25 2010 +0200
+++ b/tests/auto/qftp/tst_qftp.cpp	Tue Feb 02 00:43:10 2010 +0200
@@ -618,7 +618,7 @@
     }
     addCommand( QFtp::Close, ftp->close() );
 
-    QTestEventLoop::instance().enterLoop( 30 );
+    QTestEventLoop::instance().enterLoop( 50 );
     delete ftp;
     if ( QTestEventLoop::instance().timeout() )
         QFAIL( "Network operation timed out" );
@@ -1020,7 +1020,7 @@
         addCommand( QFtp::Put, ftp->put( QByteArray(), createFile ) );
         addCommand( QFtp::Close, ftp->close() );
 
-        QTestEventLoop::instance().enterLoop( 30 );
+        QTestEventLoop::instance().enterLoop( 50 );
         delete ftp;
         if ( QTestEventLoop::instance().timeout() )
             QFAIL( "Network operation timed out" );
@@ -1295,14 +1295,18 @@
     // Qt/CE and Symbian test environment has to less memory for this test
 #if !defined(Q_OS_WINCE) && !defined(Q_OS_SYMBIAN)
     QByteArray bigData( 10*1024*1024, 0 );
+#else
+    QByteArray bigData( 1*1024*1024, 0 );
+#endif
     bigData.fill( 'B' );
-
     QTest::newRow( "put_fluke01" ) << QtNetworkSettings::serverName() << (uint)21 << QString("qtest/upload/abort_put") << bigData;
-#endif
 }
 
 void tst_QFtp::abort()
 {
+    // In case you wonder where the abort() actually happens, look into
+    // tst_QFtp::dataTransferProgress
+    //
     QFETCH( QString, host );
     QFETCH( uint, port );
     QFETCH( QString, file );
@@ -1324,7 +1328,7 @@
     addCommand( QFtp::Close, ftp->close() );
 
     for(int time = 0; time <= uploadData.length() / 30000; time += 30) {
-        QTestEventLoop::instance().enterLoop( 30 );
+        QTestEventLoop::instance().enterLoop( 50 );
         if(ftp->currentCommand() == QFtp::None)
             break;
     }
@@ -1404,7 +1408,7 @@
     if ( type != 0 )
         addCommand( QFtp::Close, ftp->close() );
 
-    QTestEventLoop::instance().enterLoop( 30 );
+    QTestEventLoop::instance().enterLoop( 40 );
     if ( QTestEventLoop::instance().timeout() )
         QFAIL( "Network operation timed out" );
 
@@ -1493,7 +1497,7 @@
     addCommand( QFtp::Cd, ftp->cd( dir ) );
     addCommand( QFtp::List, ftp->list() );
 
-    QTestEventLoop::instance().enterLoop( 30 );
+    QTestEventLoop::instance().enterLoop( 50 );
 
     delete ftp;
     if ( QTestEventLoop::instance().timeout() ) {
@@ -1921,7 +1925,7 @@
     delete ftp;
     if ( QTestEventLoop::instance().timeout() ) {
         // ### make this test work
-        qWarning("Network operation timed out");
+        qWarning("tst_QFtp::fileExists: Network operation timed out");
         return FALSE;
     }
     inFileDirExistsFunction = FALSE;
@@ -1972,6 +1976,7 @@
     if ( QTestEventLoop::instance().timeout() ) {
         // ### make this test work
         // QFAIL( "Network operation timed out" );
+        qWarning("tst_QFtp::dirExists: Network operation timed out");
         return FALSE;
     }
     inFileDirExistsFunction = FALSE;