History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRUBY-1371
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Charles Oliver Nutter
Reporter: Michal Vyskocil
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
JRuby

testTime.rb doesn't work correctly on some configuration

Created: 19/Sep/07 08:45 AM   Updated: 22/Dec/07 06:26 AM
Component/s: None
Affects Version/s: JRuby 1.0.0
Fix Version/s: JRuby 1.0.3, JRuby 1.1RC2

Time Tracking:
Not Specified

File Attachments: 1. GZip Archive time-info.tar.gz (2 kb)

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


 Description  « Hide
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 ).



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Charles Oliver Nutter - 19/Oct/07 09:01 PM
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.

Charles Oliver Nutter - 26/Oct/07 09:12 PM
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.

Michal Vyskocil - 29/Oct/07 02:42 AM
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.

Charles Oliver Nutter - 30/Oct/07 02:46 AM
Minor; bumping off 1.0.2

Tom Quellenberg - 03/Nov/07 11:31 AM
I'm quite sure that this bug was solved by JRUBY-1102.

Charles Oliver Nutter - 07/Nov/07 12:41 AM
Fixed along with JRUBY-1102.