JRuby

testTime.rb doesn't work correctly on some configuration

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: JRuby 1.0.0
  • Fix Version/s: JRuby 1.0.3, JRuby 1.1RC2
  • Component/s: None
  • Labels:
    None
  • Environment:
    OpenSuse 10.3 Beta3, Linux zelva 2.6.22.5-16-default #1 SMP 2007/09/11 14:25:31 UTC x86_64 x86_64 x86_64 GNU/Linux
  • Number of attachments :
    1

Description

I'm try to rebuild jruby's src.rpm from jpackage.org (JPP-1.7) and build fails on line 18 in test/testTime.rb:

test_equal(Time.now.dst? ? 1 : -1, t3 <=> t4)

This line is depend on configuration of a build system and not work properly, if the timezone (/etc/localtime, and /etc/sysconfig/clock) is default with implicit values. In that case the compare returns false. In system configured to any other zone (eg. CET), the test returns true. This behavior is the same as (c)ruby interpreter, and this is not a bug in jruby, but in jruby's unittest. Unfortunately I cannot configure the build system using specfile and the package have to be build in this kind of environment (but I attach the /etc/localtime and /etc/sysconfig/zoneinfo files). I can only create a patch to this test and comment these line, but it isn't the best approach (it's the best way with my poor knowledge about ruby ).

Activity

Hide
Charles Oliver Nutter added a comment -

I didn't see a patch in the attached file; we'd love for you to create one, even if it's not the best solution.

Show
Charles Oliver Nutter added a comment - I didn't see a patch in the attached file; we'd love for you to create one, even if it's not the best solution.
Hide
Charles Oliver Nutter added a comment -

Likely to get punted to post 1.0.2 if we don't hear back soon...so if you have any sort of patch, please submit it.

Show
Charles Oliver Nutter added a comment - Likely to get punted to post 1.0.2 if we don't hear back soon...so if you have any sort of patch, please submit it.
Hide
Michal Vyskocil added a comment -

I don't have any patch, except one, which removes this test. Maybe it's necessary to add a condition which will detect the timezone.

Show
Michal Vyskocil added a comment - I don't have any patch, except one, which removes this test. Maybe it's necessary to add a condition which will detect the timezone.
Hide
Charles Oliver Nutter added a comment -

Minor; bumping off 1.0.2

Show
Charles Oliver Nutter added a comment - Minor; bumping off 1.0.2
Hide
Tom Quellenberg added a comment -

I'm quite sure that this bug was solved by JRUBY-1102.

Show
Tom Quellenberg added a comment - I'm quite sure that this bug was solved by JRUBY-1102.
Hide
Charles Oliver Nutter added a comment -

Fixed along with JRUBY-1102.

Show
Charles Oliver Nutter added a comment - Fixed along with JRUBY-1102.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: