[geary/mjog/logging-update: 2/8] Ensure AccountProcessorTest stops its test article
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/logging-update: 2/8] Ensure AccountProcessorTest stops its test article
- Date: Mon, 2 Dec 2019 10:26:09 +0000 (UTC)
commit 56601cfb5c6eae27688ac0b7b4bea900a5cf1f78
Author: Michael Gratton <mike vee net>
Date: Mon Dec 2 10:40:31 2019 +1100
Ensure AccountProcessorTest stops its test article
Add ::tear_down, stop the test article from running, so it doesn't
keep executing after tests have run.
test/engine/imap-engine/account-processor-test.vala | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/test/engine/imap-engine/account-processor-test.vala
b/test/engine/imap-engine/account-processor-test.vala
index 35577c26..4f2ed50a 100644
--- a/test/engine/imap-engine/account-processor-test.vala
+++ b/test/engine/imap-engine/account-processor-test.vala
@@ -26,7 +26,6 @@ public class Geary.ImapEngine.AccountProcessorTest : TestCase {
public override async void execute(Cancellable cancellable)
throws Error {
- print("Test op/");
this.execute_called = true;
if (this.wait_for_cancel) {
yield this.spinlock.wait_async(cancellable);
@@ -62,10 +61,6 @@ public class Geary.ImapEngine.AccountProcessorTest : TestCase {
add_test("failure", failure);
add_test("duplicate", duplicate);
add_test("stop", stop);
-
- // XXX this has to be here instead of in set_up for some
- // reason...
- this.processor = new AccountProcessor("processor");
}
public override void set_up() {
@@ -76,6 +71,19 @@ public class Geary.ImapEngine.AccountProcessorTest : TestCase {
new RFC822.MailboxAddress(null, "test1 example com")
);
this.account = new Geary.MockAccount(this.info);
+ this.processor = new AccountProcessor("processor");
+
+ this.succeeded = 0;
+ this.failed = 0;
+ this.completed = 0;
+ }
+
+ public override void tear_down() {
+ this.processor.stop();
+ this.processor = null;
+
+ this.account = null;
+ this.info = null;
this.succeeded = 0;
this.failed = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]