[geary/wip/imap-db-acccount-test-flakey] Add temp debug logging
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/imap-db-acccount-test-flakey] Add temp debug logging
- Date: Mon, 21 Jan 2019 11:24:16 +0000 (UTC)
commit 310160af419d06c1ebae9428111fb0006d07e1c6
Author: Michael Gratton <mike vee net>
Date: Mon Jan 21 15:23:55 2019 +1030
Add temp debug logging
test/engine/imap-db/imap-db-account-test.vala | 10 ++++++++++
test/engine/imap-db/imap-db-database-test.vala | 8 ++++++++
2 files changed, 18 insertions(+)
---
diff --git a/test/engine/imap-db/imap-db-account-test.vala b/test/engine/imap-db/imap-db-account-test.vala
index d70e44e5..c6d0cd4f 100644
--- a/test/engine/imap-db/imap-db-account-test.vala
+++ b/test/engine/imap-db/imap-db-account-test.vala
@@ -41,12 +41,14 @@ class Geary.ImapDB.AccountTest : TestCase {
);
this.account = new Account(config);
+ print("\n *** opening account\n");
this.account.open_async.begin(
this.tmp_dir,
GLib.File.new_for_path(_SOURCE_ROOT_DIR).get_child("sql"),
null,
(obj, ret) => { async_complete(ret); }
);
+ print("*** waiting for account\n");
this.account.open_async.end(async_result());
this.root = new FolderRoot(false);
@@ -54,10 +56,12 @@ class Geary.ImapDB.AccountTest : TestCase {
public override void tear_down() throws GLib.Error {
this.root = null;
+ print("\n *** closing account\n");
this.account.close_async.begin(
null,
(obj, ret) => { async_complete(ret); }
);
+ print("*** waiting for account\n");
this.account.close_async.end(async_result());
delete_file(this.tmp_dir);
@@ -267,6 +271,7 @@ class Geary.ImapDB.AccountTest : TestCase {
}
public void fetch_child_folder() throws GLib.Error {
+ print("\n *** inserting data");
this.account.db.exec("""
INSERT INTO FolderTable (id, name, parent_id)
VALUES
@@ -274,18 +279,21 @@ class Geary.ImapDB.AccountTest : TestCase {
(2, 'test2', 1);
""");
+ print("*** fetching folder\n");
this.account.fetch_folder_async.begin(
this.root.get_child("test1").get_child("test2"),
null,
(obj, ret) => { async_complete(ret); }
);
+ print("*** waiting for result\n");
Folder? result = this.account.fetch_folder_async.end(async_result());
assert_non_null(result);
assert_string("test2", result.get_path().name);
}
public void fetch_nonexistent_folder() throws GLib.Error {
+ print("\n *** inserting data");
this.account.db.exec("""
INSERT INTO FolderTable (id, name, parent_id)
VALUES
@@ -293,11 +301,13 @@ class Geary.ImapDB.AccountTest : TestCase {
(2, 'test2', 1);
""");
+ print("*** fetching folder\n");
this.account.fetch_folder_async.begin(
this.root.get_child("test3"),
null,
(obj, ret) => { async_complete(ret); }
);
+ print("*** waiting for result\n");
try {
this.account.fetch_folder_async.end(async_result());
assert_not_reached();
diff --git a/test/engine/imap-db/imap-db-database-test.vala b/test/engine/imap-db/imap-db-database-test.vala
index 892d2815..f274f47a 100644
--- a/test/engine/imap-db/imap-db-database-test.vala
+++ b/test/engine/imap-db/imap-db-database-test.vala
@@ -29,10 +29,12 @@ class Geary.ImapDB.DatabaseTest : TestCase {
"test example com"
);
+ print("\n*** opening database\n");
db.open.begin(
Geary.Db.DatabaseFlags.CREATE_FILE, null,
(obj, ret) => { async_complete(ret); }
);
+ print("*** waiting for database\n");
db.open.end(async_result());
// Need to get a connection since the database doesn't
@@ -40,7 +42,9 @@ class Geary.ImapDB.DatabaseTest : TestCase {
db.get_master_connection();
// Need to close it again to stop the GC process running
+ print("*** closing database\n");
db.close();
+ print("*** database closed\n");
db.file.delete();
tmp_dir.delete();
@@ -97,10 +101,12 @@ class Geary.ImapDB.DatabaseTest : TestCase {
"test example com"
);
+ print("\n*** opening database\n");
db.open.begin(
Geary.Db.DatabaseFlags.CREATE_FILE, null,
(obj, ret) => { async_complete(ret); }
);
+ print("*** waiting for database\n");
db.open.end(async_result());
assert_int(25, db.get_schema_version(), "Post-upgrade version");
@@ -119,7 +125,9 @@ class Geary.ImapDB.DatabaseTest : TestCase {
// Need to close it again to stop the GC process running
+ print("*** closing database\n");
db.close();
+ print("*** database closed\n");
Files.recursive_delete_async.begin(
tmp_dir, GLib.Priority.DEFAULT, null,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]