Permalink
Browse files

Add error handling to threaded interaction test

Travis seems to raise an error during interaction start which was caught
inside the thread before.
  • Loading branch information...
1 parent bd21504 commit 631df96e38305e8c545e5cb784601fd9a406bba4 @thomasjachmann committed May 14, 2012
Showing with 9 additions and 5 deletions.
  1. +9 −5 test/test_interaction.rb
View
@@ -175,12 +175,16 @@ class TestInteraction < Test::Unit::TestCase
should 'set active to false in blocking mode' do
i = Launchpad::Interaction.new
- Thread.new do
- i.start
+ begin
+ t = Thread.new do
+ i.start
+ end
+ assert i.active
+ i.stop
+ assert !i.active
+ ensure
+ t.join
end
- assert i.active
- i.stop
- assert !i.active
end
should 'set active to false in detached mode' do

0 comments on commit 631df96

Please sign in to comment.