Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: JRuby 1.6.6
-
Fix Version/s: JRuby 1.6.6
-
Component/s: Application Error
-
Labels:None
-
Environment:Windows 7 Java V1.6.0_27 (32 bits); Linux Fedora 16; OpenJDK 6
-
Number of attachments :
Description
When jruby-src-1.6.6.tar.gz is downloaded from http://jruby.org/download, ant test fails:
A/ on Windows 7 for two reasons:
1/ On a French version of Windows 7
test_big_decimal must be changed from assert_equal "10.00", format.format(value) to:
assert_equal "10,00" format.format(value) (this test does not handle the locale)
2/ When this is corrected, it fails with the ruby -IC:... command
B/ on Linux Fedora 16, for one reason:
run-junit-interpreted-short:
[echo] compile=OFF, jit.threshold=20, jit.maxsize=1000000000, jit.max=-1, objectspace=false threadpool=false reflection=false version=ruby1_8
[junit] WARNING: multiple versions of ant detected in path for junit
[junit] jar:file:/usr/share/java/ant.jar!/org/apache/tools/ant/Project.class
[junit] and jar:file:/usr/share/ant/lib/ant.jar!/org/apache/tools/ant/Project.class
[junit] Testsuite: org.jruby.test.ScriptTestSuite
[junit] Tests run: 71, Failures: 0, Errors: 0, Time elapsed: 13.272 sec
[junit]
[junit] Testsuite: org.jruby.test.JRubyTestSuite
[junit] LoadError: no such file to load – ubygems
[junit] Tests run: 98, Failures: 1, Errors: 0, Time elapsed: 144.463 sec
[junit]
[junit] ------------- Standard Error -----------------
[junit] LoadError: no such file to load – ubygems
[junit] ------------- ---------------- ---------------
[junit] Testcase: test_load_compiled_ruby_class_from_classpath(org.jruby.test.TestUnitTestSuite$ScriptTest): FAILED
[junit] Faults encountered running test/test_load_compiled_ruby_class_from_classpath, complete output follows:
[junit] Failure:
[junit] test_loading_compiled_ruby_class_from_jar(LoadCompiledRubyClassFromClasspathTest)
[junit] [./test/test_load_compiled_ruby_class_from_classpath.rb:84:in `test_loading_compiled_ruby_class_from_jar'
[junit] org/jruby/RubyKernel.java:2074:in `send'
[junit] org/jruby/RubyArray.java:1614:in `each']:
[junit] did not get 0 for exit status from running java against the jar.
[junit] <0> expected but was
[junit] <1>.
[junit]
[junit] junit.framework.AssertionFailedError: Faults encountered running test/test_load_compiled_ruby_class_from_classpath, complete output follows:
[junit] Failure:
[junit] test_loading_compiled_ruby_class_from_jar(LoadCompiledRubyClassFromClasspathTest)
[junit] [./test/test_load_compiled_ruby_class_from_classpath.rb:84:in `test_loading_compiled_ruby_class_from_jar'
[junit] org/jruby/RubyKernel.java:2074:in `send'
[junit] org/jruby/RubyArray.java:1614:in `each']:
[junit] did not get 0 for exit status from running java against the jar.
[junit] <0> expected but was
[junit] <1>.
[junit]
[junit] at org.jruby.test.TestUnitTestSuite$ScriptTest.runTest(TestUnitTestSuite.java:224)
[junit]
[junit]
BUILD FAILED
/home/philippe/jruby-1.6.6/build.xml:874: The following error occurred while executing this line:
/home/philippe/jruby-1.6.6/build.xml:1023: The following error occurred while executing this line:
/home/philippe/jruby-1.6.6/build.xml:971: Tests failed
Finally got a successful $ ant test on my Linux. I suffer from three problems, one of which on my Windows 7 computer (French version)
1/ A restrictive firewall. I had to add in in my /etc/sysconfig/iptables the line
-A INPUT -m state --state NEW -m udp -p udp -d 225.4.5.6 --dport 6789 -j ACCEPT
Without this line this caused test/test_socket.rb to hang
2/ my ~/.bash_profile has the following line:
export RUBYOPT=-rubygems
which caused the Load error on ubygems by JRuby. It has to be unset.
With this RUBYOPT export set this way this caused test/test_load_compiled_ruby_class_from_classpath.rb to fail
3/ with $ export LANG=fr_FR.UTF8, test/test_big_decimal.rb fails unless
it is coded this way:
#
JRUBY-3818def test_decimal_format
require 'java'
format = java.text.DecimalFormat.new("#,##0.00")
value = java.math.BigDecimal.new("10")
assert_equal format.format(10.00), format.format(value)
end
Shall redo the C:\jruby-1.6.6> and test on my Windows computer. It suffers from a problem at the end. Shall give more precisions in a future update.