[tracker/sam/tracker-3.0-functional-tests: 116/117] functional-tests: Improve errors when awaiting resources



commit f0dc625a0e3a4e8b2cc0cd50a6c4b99aca959688
Author: Sam Thursfield <sam afuera me uk>
Date:   Wed Feb 12 22:17:32 2020 +0100

    functional-tests: Improve errors when awaiting resources

 utils/trackertestutils/helpers.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/utils/trackertestutils/helpers.py b/utils/trackertestutils/helpers.py
index 2fd0d852e..79c19ee6a 100644
--- a/utils/trackertestutils/helpers.py
+++ b/utils/trackertestutils/helpers.py
@@ -156,7 +156,8 @@ class await_insert():
 
         def timeout_cb():
             log.info("Timeout fired after %s seconds", self.timeout)
-            raise AwaitTimeoutException()
+            raise AwaitTimeoutException(
+                f"Timeout awaiting insert of resource matching: {self.predicates}")
 
         self.signal_id = self.notifier.connect('events', match_cb)
         self.timeout_id = GLib.timeout_add_seconds(self.timeout, timeout_cb)
@@ -238,7 +239,9 @@ class await_update():
 
         def timeout_cb():
             log.info("Timeout fired after %s seconds", self.timeout)
-            raise AwaitTimeoutException()
+            raise AwaitTimeoutException(
+                f"Timeout awaiting update of resource {self.resource_id} "
+                f"matching: {self.after_predicates}")
 
         self.signal_id = self.notifier.connect('events', match_cb)
         self.timeout_id = GLib.timeout_add_seconds(self.timeout, timeout_cb)
@@ -296,7 +299,8 @@ class await_delete():
 
         def timeout_cb():
             log.info("Timeout fired after %s seconds", self.timeout)
-            raise AwaitTimeoutException()
+            raise AwaitTimeoutException(
+                f"Timeout awaiting removal of resource {self.resource_id} ")
 
         self.signal_id = self.notifier.connect('events', match_cb)
         self.timeout_id = GLib.timeout_add_seconds(self.timeout, timeout_cb)


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