[perl-Glib] Try to avoid a possible hang in t/9.t
- From: Torsten Schönfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Glib] Try to avoid a possible hang in t/9.t
- Date: Mon, 3 Apr 2017 13:04:58 +0000 (UTC)
commit 77e102c12e2992834608eefb21cd4a07416b5dab
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date: Mon Apr 3 15:02:57 2017 +0200
Try to avoid a possible hang in t/9.t
There was already a watchdog timeout callback installed, but it simply
raised an exception which was then ignored. Instead, signal test
failures and quit the active main loop.
t/9.t | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/t/9.t b/t/9.t
index b394f53..f042bfd 100644
--- a/t/9.t
+++ b/t/9.t
@@ -267,7 +267,13 @@ if (Glib->CHECK_VERSION (2, 14, 0)) {
'hello');
$timer_id = Glib::Timeout->add
(30_000, # 30 seconds should be more than enough for child exit
- sub { die "Oops, child watch callback didn't run\n"; });
+ sub {
+ warn "*** Oops, child watch callback didn't run\n";
+ print "not ok 29\n";
+ print "not ok 30\n";
+ $loop->quit;
+ return Glib::SOURCE_CONTINUE;
+ });
$loop->run;
Glib::Source->remove ($timer_id);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]