ActiveRecord test problem

View: New views
1 Messages — Rating Filter:   Alert me  

ActiveRecord test problem

by ffrancy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I have a problem to run ActiveRecord's tests.



I downloaded the source code of ActiveRecord and I put it in

NetBeansProject folder (I use that IDE).



I opened it as a Ruby project with existing source. I had also to put

activesupport and the other gems in the same folder of ActiveRecord,

otherwise it gave me an error.



I created the database and I configured tests for jdbcmysql, but when I

do jruby -S rake test_mysql it give me this error:





ffrancy@cray:~/NetBeansProjects/activerecord-2.2.2$ jruby -S rake

test_mysql

(in /home/ffrancy/NetBeansProjects/activerecord-2.2.2)

/opt/jruby-1.1.6/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/gempackagetask.rb:13:Warning:

Gem::manage_gems is deprecated and will be removed on or after March

2009.



/opt/jruby/bin/jruby -Ilib:test:test/connections/native_mysql

"/opt/jruby-1.1.6/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb"

"test/cases/aaa_create_tables_test.rb"

"test/cases/active_schema_test_mysql.rb" "test/cases/adapter_test.rb"

"test/cases/aggregations_test.rb" "test/cases/ar_schema_test.rb"

"test/cases/associations/belongs_to_associations_test.rb"

"test/cases/associations/callbacks_test.rb"

"test/cases/associations/cascaded_eager_loading_test.rb"

"test/cases/associations/eager_load_includes_full_sti_class_test.rb"

"test/cases/associations/eager_load_nested_include_test.rb"

"test/cases/associations/eager_singularization_test.rb"

"test/cases/associations/eager_test.rb"

"test/cases/associations/extension_test.rb"

"test/cases/associations/has_and_belongs_to_many_associations_test.rb"

"test/cases/associations/has_many_associations_test.rb"

"test/cases/associations/has_many_through_associations_test.rb"

"test/cases/associations/has_one_associations_test.rb"

"test/cases/associations/has_one_through_associations_test.rb"

"test/cases/associations/inner_join_association_test.rb"

"test/cases/associations/join_model_test.rb"

"test/cases/associations_test.rb" "test/cases/attribute_methods_test.rb"

"test/cases/base_test.rb" "test/cases/binary_test.rb"

"test/cases/calculations_test.rb"

"test/cases/callbacks_observers_test.rb" "test/cases/callbacks_test.rb"

"test/cases/class_inheritable_attributes_test.rb"

"test/cases/column_alias_test.rb" "test/cases/column_definition_test.rb"

"test/cases/connection_test_mysql.rb"

"test/cases/database_statements_test.rb" "test/cases/date_time_test.rb"

"test/cases/defaults_test.rb" "test/cases/deprecated_finder_test.rb"

"test/cases/dirty_test.rb" "test/cases/finder_respond_to_test.rb"

"test/cases/finder_test.rb" "test/cases/fixtures_test.rb"

"test/cases/i18n_test.rb" "test/cases/inheritance_test.rb"

"test/cases/invalid_date_test.rb"

"test/cases/json_serialization_test.rb" "test/cases/lifecycle_test.rb"

"test/cases/locking_test.rb" "test/cases/method_scoping_test.rb"

"test/cases/migration_test.rb" "test/cases/mixin_test.rb"

"test/cases/modules_test.rb" "test/cases/multiple_db_test.rb"

"test/cases/named_scope_test.rb" "test/cases/pk_test.rb"

"test/cases/pooled_connections_test.rb" "test/cases/query_cache_test.rb"

"test/cases/readonly_test.rb" "test/cases/reflection_test.rb"

"test/cases/reload_models_test.rb"

"test/cases/reserved_word_test_mysql.rb" "test/cases/sanitize_test.rb"

"test/cases/schema_dumper_test.rb" "test/cases/serialization_test.rb"

"test/cases/transactions_test.rb" "test/cases/unconnected_test.rb"

"test/cases/validations_i18n_test.rb" "test/cases/validations_test.rb"

"test/cases/xml_serialization_test.rb"



Using native MySQL



MysqlConnectionTest



Loaded suite

/opt/jruby-1.1.6/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader

Started

.............................................................................................................EEEEEEEEEEEE.FF..................................................................................................................................................................................................................................................................................................................F..................................................F......................................................................................................................................F.........................................................................................................................................................................................................................................................................................................................................F...........................................
 ..............................................................................................................................................F....................................................................................................................................................................................................................................................................E.........F...........F..........F...F.............F.com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException:

Connection.close() has already been called. Invalid operation in this

state.

  at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:888)

  at com.mysql.jdbc.Connection.getMutex(Connection.java:3640)

  at com.mysql.jdbc.Connection.setAutoCommit(Connection.java:5243)

  at

jdbc_adapter.RubyJdbcConnection.rollback(RubyJdbcConnection.java:430)

  at

jdbc_adapter.RubyJdbcConnection$i_method_0_0$RUBYINVOKER$rollback.call(jdbc_adapter/RubyJdbcConnection$i_method_0_0$RUBYINVOKER$rollback.gen)

  at

org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:73)

  at

ruby.jit.ruby.home.ffrancy.$_dot_gem.jruby.$1_dot_8.gems.activerecord_minus_jdbc_minus_adapter_minus_0_dot_9_dot_1.lib.jdbc_adapter.jdbc_mysql.rollback_db_transaction4212265_8331873.rescue_1$RUBY$__rescue___0(jdbc_mysql.rb:109)

  at

ruby.jit.ruby.home.ffrancy.$_dot_gem.jruby.$1_dot_8.gems.activerecord_minus_jdbc_minus_adapter_minus_0_dot_9_dot_1.lib.jdbc_adapter.jdbc_mysql.rollback_db_transaction4212265_8331873.__file__(jdbc_mysql.rb)

  at

org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:195)

  at

org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:73)

  at

ruby.jit.ruby.home.ffrancy.NetBeansProjects.activerecord_minus_2_dot_2_dot_2.lib.active_record.fixtures.teardown_fixtures21821228_8331873.__file__(fixtures.rb:955)

  at

ruby.jit.ruby.home.ffrancy.NetBeansProjects.activerecord_minus_2_dot_2_dot_2.lib.active_record.fixtures.teardown_fixtures21821228_8331873.__file__(fixtures.rb)

  at

org.jruby.internal.runtime.methods.DefaultMethod.retryJITCall(DefaultMethod.java:141)

  at

org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:131)

  at org.jruby.RubyClass.finvoke(RubyClass.java:353)

  at org.jruby.RubyObject.send(RubyObject.java:1385)

  at

org.jruby.RubyObject$i_method_multi$RUBYINVOKER$send.call(org/jruby/RubyObject$i_method_multi$RUBYINVOKER$send.gen)

  at

org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:240)

  at

org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:44)

  at

ruby.jit.ruby.home.ffrancy.NetBeansProjects.activesupport.lib.active_support.callbacks.evaluate_method27680714_8331873.__file__(callbacks.rb:178)

  at

org.jruby.internal.runtime.methods.DefaultMethod.retryJITCall(DefaultMethod.java:141)

  at

org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:131)

  at

org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:42)

  at

ruby.jit.ruby.home.ffrancy.NetBeansProjects.activesupport.lib.active_support.callbacks.call10442562_8331873.rescue_1$RUBY$__rescue___0(callbacks.rb:166)

  at

ruby.jit.ruby.home.ffrancy.NetBeansProjects.activesupport.lib.active_support.callbacks.call10442562_8331873.__file__(callbacks.rb)

  at

org.jruby.ast.executable.AbstractScript.__file__(AbstractScript.java:31)

  at

org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:237)

  at

org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:114)

  at

ruby.jit.ruby.home.ffrancy.NetBeansProjects.activesupport.lib.active_support.callbacks.run27050467_8331873.block_1$RUBY$__block__(callbacks.rb:90)

  at

ruby.jit.ruby.home.ffrancy.NetBeansProjects.activesupport.lib.active_support.callbacks.run27050467_8331873BlockCallback$block_1$RUBY$__block__xx1.call(Unknown

Source)

  at org.jruby.runtime.CompiledBlock.yield(CompiledBlock.java:100)

  at org.jruby.runtime.Block.yield(Block.java:120)

  at org.jruby.RubyArray.reverse_each(RubyArray.java:1597)

  at

org.jruby.RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$reverse_each.call(org/jruby/RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$reverse_each.gen)

  at org.jruby.RubyClass.finvoke(RubyClass.java:332)

  at org.jruby.RubyObject.send(RubyObject.java:1358)

  at

org.jruby.RubyObject$i_method_multi$RUBYINVOKER$send.call(org/jruby/RubyObject$i_method_multi$RUBYINVOKER$send.gen)

  at

org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:139)

  at

ruby.jit.ruby.home.ffrancy.NetBeansProjects.activesupport.lib.active_support.callbacks.run27050467_8331873.__file__(callbacks.rb:90)

  at

org.jruby.ast.executable.AbstractScript.__file__(AbstractScript.java:35)

  at

org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:300)

  at

org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:165)

  at

ruby.jit.ruby.home.ffrancy.NetBeansProjects.activesupport.lib.active_support.callbacks.run_callbacks32517802_8331873.__file__(callbacks.rb:277)

  at

org.jruby.ast.executable.AbstractScript.__file__(AbstractScript.java:35)

  at

org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:279)

  at

org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:300)

  at

org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:157)

  at

ruby.jit.ruby.home.ffrancy.NetBeansProjects.activesupport.lib.active_support.testing.setup_and_teardown.run_with_callbacks_and_mocha31435972_8331873.rescue_2$RUBY$__rescue___6(setup_and_teardown.rb:105)

  at

ruby.jit.ruby.home.ffrancy.NetBeansProjects.activesupport.lib.active_support.testing.setup_and_teardown.run_with_callbacks_and_mocha31435972_8331873.ensure_2$RUBY$__ensure___1(setup_and_teardown.rb:103)

  at

ruby.jit.ruby.home.ffrancy.NetBeansProjects.activesupport.lib.active_support.testing.setup_and_teardown.run_with_callbacks_and_mocha31435972_8331873.ensure_1$RUBY$__ensure___0(setup_and_teardown.rb:91)

  at

ruby.jit.ruby.home.ffrancy.NetBeansProjects.activesupport.lib.active_support.testing.setup_and_teardown.run_with_callbacks_and_mocha31435972_8331873.__file__(setup_and_teardown.rb:89)

  at

org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:258)

  at

org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:84)

  at

org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:290)

  at

org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:126)

  at

ruby.jit.ruby.opt.jruby_minus_1_dot_1_dot_6.lib.ruby.$1_dot_8.test.unit.testsuite.run11202034_8331873.block_0$RUBY$__block__(testsuite.rb:34)

  at

ruby.jit.ruby.opt.jruby_minus_1_dot_1_dot_6.lib.ruby.$1_dot_8.test.unit.testsuite.run11202034_8331873BlockCallback$block_0$RUBY$__block__xx1.call(Unknown

Source)

  at org.jruby.runtime.CompiledBlock.yield(CompiledBlock.java:100)

  at org.jruby.runtime.Block.yield(Block.java:120)

  at org.jruby.RubyArray.each(RubyArray.java:1559)

  at

org.jruby.RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.call(org/jruby/RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.gen)

  at

org.jruby.runtime.callsite.CachingCallSite.callIter(CachingCallSite.java:98)

  at

ruby.jit.ruby.opt.jruby_minus_1_dot_1_dot_6.lib.ruby.$1_dot_8.test.unit.testsuite.run11202034_8331873.__file__(testsuite.rb:33)

  at

org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:258)

  at

org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:124)

  at

org.jruby.ast.CallOneArgBlockPassNode.interpret(CallOneArgBlockPassNode.java:60)

  at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)

  at

org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:202)

  at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:153)

  at org.jruby.runtime.Block.yield(Block.java:120)

  at org.jruby.RubyArray.each(RubyArray.java:1559)

  at

org.jruby.RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.call(org/jruby/RubyArray$i_method_0_0$RUBYFRAMEDINVOKER$each.gen)

  at

org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:270)

  at

org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:85)

  at

org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:63)

  at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)

  at org.jruby.ast.BlockNode.interpret(BlockNode.java:68)

  at

org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:156)

  at

org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:133)

  at

org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:267)

  at

org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:290)

  at

org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:126)

  at

org.jruby.ast.CallOneArgBlockNode.interpret(CallOneArgBlockNode.java:60)

  at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)

  at org.jruby.ast.BlockNode.interpret(BlockNode.java:68)

  at

org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:156)

  at

org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:133)

  at

org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:204)

  at

org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:260)

  at

org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:75)

  at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)

  at org.jruby.ast.ReturnNode.interpret(ReturnNode.java:85)

  at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)

  at

org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:156)

  at

org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:133)

  at

org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:204)

  at

org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:260)

  at

org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:75)

  at org.jruby.ast.VCallNode.interpret(VCallNode.java:82)

  at org.jruby.ast.ReturnNode.interpret(ReturnNode.java:85)

  at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)

  at org.jruby.ast.BlockNode.interpret(BlockNode.java:68)

  at

org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:156)

  at

org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:133)

  at

org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:204)

  at

org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:260)

  at

org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:75)

  at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)

  at org.jruby.ast.ReturnNode.interpret(ReturnNode.java:85)

  at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)

  at

org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:156)

  at

org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:133)

  at

org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:288)

  at

org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:300)

  at

org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:157)

  at org.jruby.ast.CallTwoArgNode.interpret(CallTwoArgNode.java:59)

  at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)

  at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)

  at org.jruby.ast.BlockNode.interpret(BlockNode.java:68)

  at

org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:156)

  at

org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:133)

  at

org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:204)

  at

org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:260)

  at

org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:75)

  at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)

  at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)

  at org.jruby.ast.BlockNode.interpret(BlockNode.java:68)

  at

org.jruby.internal.runtime.methods.DefaultMethod.interpretedCall(DefaultMethod.java:156)

  at

org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:133)

  at

org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:204)

  at

org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:260)

  at

org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:75)

  at org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)

  at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)

  at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:101)

  at org.jruby.ast.IfNode.interpret(IfNode.java:111)

  at org.jruby.ast.NewlineNode.Finterpret(NewlineNode.java:101)

  at

org.jruby.runtime.InterpretedBlock.evalBlockBody(InterpretedBlock.java:202)

  at org.jruby.runtime.InterpretedBlock.yield(InterpretedBlock.java:190)

  at org.jruby.runtime.BlockBody.call(BlockBody.java:64)

  at org.jruby.runtime.BlockBody.call(BlockBody.java:70)

  at org.jruby.runtime.Block.call(Block.java:116)

  at org.jruby.RubyProc.call(RubyProc.java:205)

  at org.jruby.RubyProc.call(RubyProc.java:187)

  at org.jruby.Ruby.tearDown(Ruby.java:2380)

  at org.jruby.Main.run(Main.java:216)

  at org.jruby.Main.run(Main.java:100)

  at

org.jruby.util.ShellLauncher$ScriptThreadProcess.run(ShellLauncher.java:103)

  at java.lang.Thread.run(Thread.java:619)

rake aborted!

Command failed with status (-1): [/opt/jruby/bin/jruby

-Ilib:test:test/conne...]



(See full trace by running task with --trace)





Any ideas how to handle it?

I really don't know how to manage it!!!



Thanks in advance






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...