From 821678930617379d32f3e054af516236c044ff84 Mon Sep 17 00:00:00 2001 From: Cody Cutrer Date: Tue, 8 Aug 2023 14:36:13 -0600 Subject: [PATCH] Add timeout during karaf boot process waits (#95) Signed-off-by: Cody Cutrer --- lib/openhab/rspec/karaf.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/openhab/rspec/karaf.rb b/lib/openhab/rspec/karaf.rb index 78c5a71082..d93847b18b 100644 --- a/lib/openhab/rspec/karaf.rb +++ b/lib/openhab/rspec/karaf.rb @@ -574,7 +574,7 @@ def blocked_bundle?(bundle) bundle.fragment? end - def wait + def wait(timeout: 30) mutex = Mutex.new cond = ConditionVariable.new skip_wait = false @@ -587,7 +587,7 @@ def wait end mutex.synchronize do yield continue - cond.wait(mutex) unless skip_wait + cond.wait(mutex, timeout) unless skip_wait end end