diff options
author | Josh Peek <josh@joshpeek.com> | 2008-03-29 20:50:09 +0000 |
---|---|---|
committer | Josh Peek <josh@joshpeek.com> | 2008-03-29 20:50:09 +0000 |
commit | 37a004ded484dea088ddbf594216c308e878ce3d (patch) | |
tree | fb9237b26a5d6eb746c886af397aebf0cb7a4372 /activesupport/test | |
parent | 3e73278020107ea7282c45001d82e90d23a708b4 (diff) | |
download | rails-37a004ded484dea088ddbf594216c308e878ce3d.tar.gz rails-37a004ded484dea088ddbf594216c308e878ce3d.tar.bz2 rails-37a004ded484dea088ddbf594216c308e878ce3d.zip |
Ensure threads finish running for time zone thread safety test.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9136 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test')
-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] |