[gnome-ostree] testbase: Keep reading journal even after we've seen all message ids



commit 6cb9749ede96094190cd317b66f960e572e79213
Author: Colin Walters <walters verbum org>
Date:   Tue May 7 15:07:50 2013 -0400

    testbase: Keep reading journal even after we've seen all message ids
    
    This way we'll still error out if something coredumps while we're
    doing the final wait.

 src/js/tasks/testbase.js |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/js/tasks/testbase.js b/src/js/tasks/testbase.js
index 06c5030..8fa1899 100644
--- a/src/js/tasks/testbase.js
+++ b/src/js/tasks/testbase.js
@@ -108,15 +108,15 @@ const TestOneDisk = new Lang.Class({
                     this._loop.quit();
                 }
             }
-            if (this._countPendingRequiredMessageIds > 0) {
-                this._readingJournal = true;
-                this._journalDataStream.read_line_async(GLib.PRIORITY_DEFAULT, this._cancellable,
-                                                        Lang.bind(this, this._onJournalReadLine));
-            } else {
+            if (this._countPendingRequiredMessageIds == 0 && !this._foundAllMessageIds) {
                 print("Found all required message IDs");
                 this._foundAllMessageIds = true;
                 GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, COMPLETE_IDLE_WAIT_SECONDS,
                                          Lang.bind(this, this._onFinalWait));
+            } else {
+                this._readingJournal = true;
+                this._journalDataStream.read_line_async(GLib.PRIORITY_DEFAULT, this._cancellable,
+                                                        Lang.bind(this, this._onJournalReadLine));
             }
         }
     },


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]