[geary/wip/imap-db-acccount-test-flakey: 4/4] 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: 4/4] Add temp debug logging
- Date: Mon, 21 Jan 2019 13:58:43 +0000 (UTC)
commit c2d9ae4f7b0fceafda4895f000c5d39c9e9f9d51
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 | 11 +++++++++++
test/engine/imap-db/imap-db-database-test.vala | 8 ++++++++
2 files changed, 19 insertions(+)
---
diff --git a/test/engine/imap-db/imap-db-account-test.vala b/test/engine/imap-db/imap-db-account-test.vala
index 768416bc..76253903 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,11 +56,14 @@ 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());
+ print("*** account closed\n");
delete_file(this.tmp_dir);
this.tmp_dir = null;
@@ -267,6 +272,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 +280,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 +302,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 f7c55728..75559a4f 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");
delete_file(tmp_dir);
}
@@ -96,10 +100,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");
@@ -118,7 +124,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");
delete_file(tmp_dir);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]