[git] GPGME - branch, master, updated. gpgme-1.8.0-42-gba594d8

by Justus Winter cvs at cvs.gnupg.org
Tue Jan 31 12:02:47 CET 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".

The branch, master has been updated
       via  ba594d85e35e63301755977234d3af88a167a215 (commit)
      from  752d3597ef02a95efd693373132bf1e246f0edb0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ba594d85e35e63301755977234d3af88a167a215
Author: Justus Winter <justus at g10code.com>
Date:   Tue Jan 31 10:47:00 2017 +0100

    qt: Increase timeout when waiting for signals.
    
    * lang/qt/tests/t-support.h (QSIGNALSPY_TIMEOUT): New macro.
    * lang/qt/tests/t-encrypt.cpp: Use the new macro as timeout when
    waiting for signals.
    * lang/qt/tests/t-keylist.cpp: Likewise.
    * lang/qt/tests/t-keylocate.cpp: Likewise.
    * lang/qt/tests/t-ownertrust.cpp: Likewise.
    * lang/qt/tests/t-wkspublish.cpp: Likewise.
    --
    Increase the timeout when waiting for signals from 5 seconds to 60.
    This addresses intermittent test failures on slow machines.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/lang/qt/tests/t-encrypt.cpp b/lang/qt/tests/t-encrypt.cpp
index 57b586d..ba4a1c5 100644
--- a/lang/qt/tests/t-encrypt.cpp
+++ b/lang/qt/tests/t-encrypt.cpp
@@ -165,7 +165,7 @@ private Q_SLOTS:
 
         job->start(keys, inptr, outptr, Context::AlwaysTrust);
         QSignalSpy spy (this, SIGNAL(asyncDone()));
-        QVERIFY(spy.wait());
+        QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
     }
 
     void testSymmetricEncryptDecrypt()
diff --git a/lang/qt/tests/t-keylist.cpp b/lang/qt/tests/t-keylist.cpp
index 5e88a5e..a140236 100644
--- a/lang/qt/tests/t-keylist.cpp
+++ b/lang/qt/tests/t-keylist.cpp
@@ -102,7 +102,7 @@ private Q_SLOTS:
         });
         job->start(QStringList() << "alfa at example.net");
         QSignalSpy spy (this, SIGNAL(asyncDone()));
-        QVERIFY(spy.wait());
+        QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
     }
 };
 
diff --git a/lang/qt/tests/t-keylocate.cpp b/lang/qt/tests/t-keylocate.cpp
index 550305c..8c99c8b 100644
--- a/lang/qt/tests/t-keylocate.cpp
+++ b/lang/qt/tests/t-keylocate.cpp
@@ -88,7 +88,7 @@ private Q_SLOTS:
         });
         job->start(QStringList() << mTestpattern);
         QSignalSpy spy (this, SIGNAL(asyncDone()));
-        QVERIFY(spy.wait());
+        QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
         qputenv("GNUPGHOME", oldHome.toUtf8());
     }
 #endif
@@ -122,7 +122,7 @@ private Q_SLOTS:
         });
         job->start(QStringList() << mTestpattern);
         QSignalSpy spy (this, SIGNAL(asyncDone()));
-        QVERIFY(spy.wait());
+        QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
     }
 
 private:
diff --git a/lang/qt/tests/t-ownertrust.cpp b/lang/qt/tests/t-ownertrust.cpp
index f2fa3c8..e9a4378 100644
--- a/lang/qt/tests/t-ownertrust.cpp
+++ b/lang/qt/tests/t-ownertrust.cpp
@@ -78,7 +78,7 @@ private Q_SLOTS:
         });
         job2->start(key, Key::Ultimate);
         QSignalSpy spy (this, SIGNAL(asyncDone()));
-        QVERIFY(spy.wait());
+        QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
 
         job = openpgp()->keyListJob(false, true, true);
         result = job->exec(QStringList() << QStringLiteral("alfa at example.net"),
@@ -94,7 +94,7 @@ private Q_SLOTS:
             Q_EMIT asyncDone();
         });
         job3->start(key, Key::Unknown);
-        QVERIFY(spy.wait());
+        QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
 
         job = openpgp()->keyListJob(false, true, true);
         result = job->exec(QStringList() << QStringLiteral("alfa at example.net"),
diff --git a/lang/qt/tests/t-support.h b/lang/qt/tests/t-support.h
index e3f0e78..b03b05d 100644
--- a/lang/qt/tests/t-support.h
+++ b/lang/qt/tests/t-support.h
@@ -64,4 +64,8 @@ public Q_SLOTS:
     void cleanupTestCase();
 };
 
+/* Timeout, in milliseconds, for use with QSignalSpy to wait on
+   signals.  */
+#define QSIGNALSPY_TIMEOUT	60000
+
 #endif // T_SUPPORT_H
diff --git a/lang/qt/tests/t-wkspublish.cpp b/lang/qt/tests/t-wkspublish.cpp
index 64f101e..c51e8f9 100644
--- a/lang/qt/tests/t-wkspublish.cpp
+++ b/lang/qt/tests/t-wkspublish.cpp
@@ -132,7 +132,7 @@ private Q_SLOTS:
         });
         job->startCheck ("testuser1 at localhost");
         QSignalSpy spy (this, SIGNAL(asyncDone()));
-        QVERIFY(spy.wait());
+        QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
     }
 #ifdef DO_ONLINE_TESTS
 private Q_SLOTS:
@@ -155,7 +155,7 @@ private:
         });
         job->startCheck ("testuser1 at test.gnupg.org");
         QSignalSpy spy (this, SIGNAL(asyncDone()));
-        QVERIFY(spy.wait());
+        QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
     }
 
     void testWKSPublishErrors() {
@@ -172,7 +172,7 @@ private:
         job->startCreate("AB874F24E98EBB8487EE7B170F8E3D97FE7011B7",
                          QStringLiteral("Foo at bar.baz"));
         QSignalSpy spy (this, SIGNAL(asyncDone()));
-        QVERIFY(spy.wait());
+        QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
     }
 
     void testWKSPublishCreate() {
@@ -206,7 +206,7 @@ private:
         });
         keygenjob->start(args);
         QSignalSpy spy (this, SIGNAL(asyncDone()));
-        QVERIFY(spy.wait());
+        QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
 
         /* Then try to create a request. */
         auto job = openpgp()->wksPublishJob();
@@ -223,7 +223,7 @@ private:
                      QStringLiteral("From: " TEST_ADDRESS)));
         });
         job->startCreate(fpr.constData(), QLatin1String(TEST_ADDRESS));
-        QVERIFY(spy.wait());
+        QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
     }
 
     void testWKSPublishReceive() {
@@ -242,7 +242,7 @@ private:
         });
         importjob->start(QByteArray(testSecKey));
         QSignalSpy spy (this, SIGNAL(asyncDone()));
-        QVERIFY(spy.wait());
+        QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
 
         /* Get a response. */
         auto job = openpgp()->wksPublishJob();
@@ -259,7 +259,7 @@ private:
                      QStringLiteral("From: " TEST_ADDRESS)));
         });
         job->startReceive(QByteArray(testResponse));
-        QVERIFY(spy.wait());
+        QVERIFY(spy.wait(QSIGNALSPY_TIMEOUT));
     }
 
     void initTestCase()

-----------------------------------------------------------------------

Summary of changes:
 lang/qt/tests/t-encrypt.cpp    |  2 +-
 lang/qt/tests/t-keylist.cpp    |  2 +-
 lang/qt/tests/t-keylocate.cpp  |  4 ++--
 lang/qt/tests/t-ownertrust.cpp |  4 ++--
 lang/qt/tests/t-support.h      |  4 ++++
 lang/qt/tests/t-wkspublish.cpp | 14 +++++++-------
 6 files changed, 17 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list