summaryrefslogtreecommitdiff
path: root/test/net
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-13 13:39:57 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-13 13:39:57 +0900
commitc7530f0d568e9772bef22a93907f92d8cd872995 (patch)
treef0998eba2626af383c1e3b6bcfdd76de5cb200fa /test/net
parent416e402cf3d756dcf9c5b10dc7042adf686efacf (diff)
Wait testing/helper threads to terminate
Diffstat (limited to 'test/net')
-rw-r--r--test/net/smtp/test_sslcontext.rb2
-rw-r--r--test/net/smtp/test_starttls.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/net/smtp/test_sslcontext.rb b/test/net/smtp/test_sslcontext.rb
index dd741cf..4f1dcfe 100644
--- a/test/net/smtp/test_sslcontext.rb
+++ b/test/net/smtp/test_sslcontext.rb
@@ -33,7 +33,7 @@ module Net
end
def teardown
- @server_thread&.exit
+ @server_thread&.exit&.join
@server_socket&.close
@client_socket&.close
end
diff --git a/test/net/smtp/test_starttls.rb b/test/net/smtp/test_starttls.rb
index a0855b9..4a29fa6 100644
--- a/test/net/smtp/test_starttls.rb
+++ b/test/net/smtp/test_starttls.rb
@@ -19,7 +19,7 @@ module Net
end
def teardown
- @server_thread&.exit
+ @server_thread&.exit&.join
@server_socket&.close
@client_socket&.close
end