Skip to content

Commit 384a280

Browse files
committed
[test] skip tests using with_system_tz in JNDI config
..because it's not working from inside the tomcat container
1 parent 3c904f2 commit 384a280

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/simple.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,8 @@ def test_time_with_default_timezone_utc
303303
end
304304

305305
def test_time_with_default_timezone_local
306+
skip "with_system_tz not working in tomcat" if ActiveRecord::Base.connection.raw_connection.jndi?
307+
306308
with_system_tz 'Europe/Prague' do
307309
Time.use_zone 'Europe/Prague' do
308310
with_timezone_config default: :local do
@@ -325,6 +327,8 @@ def test_time_with_default_timezone_local
325327
#
326328

327329
def test_preserving_time_objects_with_utc_time_conversion_to_default_timezone_local
330+
skip "with_system_tz not working in tomcat" if ActiveRecord::Base.connection.raw_connection.jndi?
331+
328332
with_system_tz 'America/New_York' do # with_env_tz in Rails' tests
329333
with_timezone_config default: :local do
330334
time = Time.utc(2000)
@@ -341,6 +345,8 @@ def test_preserving_time_objects_with_utc_time_conversion_to_default_timezone_lo
341345
end
342346

343347
def test_preserving_time_objects_with_time_with_zone_conversion_to_default_timezone_local
348+
skip "with_system_tz not working in tomcat" if ActiveRecord::Base.connection.raw_connection.jndi?
349+
344350
with_system_tz 'America/New_York' do # with_env_tz in Rails' tests
345351
with_timezone_config default: :local do
346352
Time.use_zone 'Central Time (US & Canada)' do

0 commit comments

Comments
 (0)