Hello,
Using the tip of nickieger’s git tree with DB2 on Linux…
Seems the first time a test env tries to access the database it doesn’t
work anymore. Symptom is running “rake test” skips unit tests altogether
and goes straight into functional testing. And if I run “rake
test:units”, I get this:
$ jruby -S rake test:units --trace
(in xxxxxxxxxxx)
** Invoke test:units (first_time)
** Invoke db:test:prepare (first_time)
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:abort_if_pending_migrations
** Execute db:test:prepare
** Invoke db:test:load (first_time)
** Invoke db:test:purge (first_time)
** Invoke environment
** Execute db:test:purge
rake aborted!
no connection available
/home/kreucher/.gem/jruby/1.8/gems/activerecord-jdbc-adapter-1.0.0.beta2-java/lib/arjdbc/db2/adapter.rb:212:in
`recreate_database’
/home/kreucher/.gem/jruby/1.8/gems/activerecord-jdbc-adapter-1.0.0.beta2-java/lib/arjdbc/jdbc/jdbc.rake:121
.
.
.
I did a bisect and found the commit that broke it:
8b4b9c597253f35873e6b621104d8c47923e1508 is the first bad commit
commit 8b4b9c597253f35873e6b621104d8c47923e1508
Author: Nick S. <[email protected]>
Date: Fri Sep 24 12:49:59 2010 -0500
JRUBY-5081: Consolidate code for dropping DB via postgres
:040000 040000 24d585e67628f5a7e83922e0f73c1cb0fa59114a
f46150f236c3144cbe66df649d243bad313e5b8c M lib
Looks like this moved some database connection stuff around… thought
I’d post here before digging in too deep. Nick S., any ideas?
Thanks!
- nick