From 176414dfa78900010fd47553ec3c05c5b9eb6659 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 30 Jul 2015 04:43:23 +0000 Subject: [PATCH] test_pair.rb: join client thread * test/openssl/test_pair.rb (test_ecdh_callback): join client thread only when it started. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/openssl/test_pair.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/openssl/test_pair.rb b/test/openssl/test_pair.rb index 588098c668..8e4aefce31 100644 --- a/test/openssl/test_pair.rb +++ b/test/openssl/test_pair.rb @@ -86,7 +86,7 @@ module OpenSSL::TestEOF1M th = Thread.new { s2 << content; s2.close } yield s1 ensure - th.join + th.join if th s1.close end end @@ -97,7 +97,7 @@ module OpenSSL::TestEOF2M th = Thread.new { s1 << content; s1.close } yield s2 ensure - th.join + th.join if th s2.close end end @@ -301,7 +301,7 @@ module OpenSSL::TestPairM assert_equal s1, t.value assert accept ensure - t.join + t.join if t s1.close if s1 s2.close if s2 sock1.close if sock1 @@ -325,7 +325,7 @@ module OpenSSL::TestPairM assert_equal s1, t.value assert accept ensure - t.join + t.join if t s1.close if s1 s2.close if s2 sock1.close if sock1 @@ -365,7 +365,7 @@ module OpenSSL::TestPairM assert called, 'ecdh callback should be called' ensure - th.join + th.join if th s1.close if s1 s2.close if s2 sock1.close if sock1 @@ -413,7 +413,7 @@ module OpenSSL::TestPairM assert_includes([s1, :wait_readable, :wait_writable ], rv) end ensure - th.join + th.join if th s1.close if s1 s2.close if s2 sock1.close if sock1 @@ -465,7 +465,7 @@ module OpenSSL::TestPairM s1.print "a\ndef" assert_equal("a\n", s2.gets) ensure - th.join + th.join if th s1.close if s1 && !s1.closed? s2.close if s2 && !s2.closed? sock1.close if sock1 && !sock1.closed?