diff options
Diffstat (limited to 'activesupport/test/core_ext/time_with_zone_test.rb')
-rw-r--r-- | activesupport/test/core_ext/time_with_zone_test.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activesupport/test/core_ext/time_with_zone_test.rb b/activesupport/test/core_ext/time_with_zone_test.rb index a1776117df..11c4270db5 100644 --- a/activesupport/test/core_ext/time_with_zone_test.rb +++ b/activesupport/test/core_ext/time_with_zone_test.rb @@ -486,8 +486,10 @@ uses_tzinfo 'TimeWithZoneTest' do def test_time_zone_setter_is_thread_safe Time.use_zone 'Paris' do - t1 = Thread.new { Time.zone = 'Alaska' } - t2 = Thread.new { Time.zone = 'Hawaii' } + t1 = Thread.new { Time.zone = 'Alaska' }.join + t2 = Thread.new { Time.zone = 'Hawaii' }.join + assert t1.stop?, "Thread 1 did not finish running" + assert t2.stop?, "Thread 2 did not finish running" assert_equal TimeZone['Paris'], Time.zone assert_equal TimeZone['Alaska'], t1[:time_zone] assert_equal TimeZone['Hawaii'], t2[:time_zone] |