rails/rails — comment on commit cceabe03a80c4a0121a2b1187b56a2d29586a43b
File:  line 0
By alexeymuranov:

Here are more details. This is what has just happened on my machine, from activerecord directory:

```shell
§ bundle exec rake test_postgresql
...
Finished tests in 85.366136s, 39.0904 tests/s, 120.1765 assertions/s.

1) Error:
test_remove_connection_for_thread(ActiveRecord::ConnectionAdapters::ConnectionPoolTest):
NoMethodError: undefined method `close' for nil:NilClass
/Volumes/Data/Users/alexey/Development/rails/activerecord/test/cases/connection_pool_test.rb:84:in `ensure in test_remove_connection_for_thread'
/Volumes/Data/Users/alexey/Development/rails/activerecord/test/cases/connection_pool_test.rb:84:in `test_remove_connection_for_thread'
/Volumes/Data/Users/alexey/.rvm/gems/ruby-1.9.3-p0/gems/mocha-0.10.0/lib/mocha/integration/mini_test/version_230_to_251.rb:28:in `run'
...
3337 tests, 10259 assertions, 0 failures, 1 errors, 10 skips
rake aborted!
...
```

```shell
§ ARCONN=postgresql ruby -I test test/cases/connection_pool_test.rb
Using postgresql with Identity Map off
Run options:

# Running tests:

.......EE

Finished tests in 0.152619s, 58.9704 tests/s, 124.4930 assertions/s.

1) Error:
test_remove_connection(ActiveRecord::ConnectionAdapters::ConnectionPoolTest):
NoMethodError: undefined method `close' for nil:NilClass
test/cases/connection_pool_test.rb:76:in `ensure in test_remove_connection'
test/cases/connection_pool_test.rb:76:in `test_remove_connection'
/Volumes/Data/Users/alexey/.rvm/gems/ruby-1.9.3-p0/gems/mocha-0.10.0/lib/mocha/integration/mini_test/version_230_to_251.rb:28:in `run'

2) Error:
test_remove_connection_for_thread(ActiveRecord::ConnectionAdapters::ConnectionPoolTest):
NoMethodError: undefined method `close' for nil:NilClass
test/cases/connection_pool_test.rb:84:in `ensure in test_remove_connection_for_thread'
test/cases/connection_pool_test.rb:84:in `test_remove_connection_for_thread'
/Volumes/Data/Users/alexey/.rvm/gems/ruby-1.9.3-p0/gems/mocha-0.10.0/lib/mocha/integration/mini_test/version_230_to_251.rb:28:in `run'

9 tests, 19 assertions, 0 failures, 2 errors, 0 skips
```

Same command again:

```shell
§ ARCONN=postgresql ruby -I test test/cases/connection_pool_test.rb
...
9 tests, 23 assertions, 0 failures, 0 errors, 0 skips
```

Like this 2 more times, then on the third time:

```shell
Using postgresql with Identity Map off
Run options:

# Running tests:

........E

Finished tests in 0.139846s, 64.3565 tests/s, 157.3159 assertions/s.

1) Error:
test_remove_connection_for_thread(ActiveRecord::ConnectionAdapters::ConnectionPoolTest):
NoMethodError: undefined method `close' for nil:NilClass
test/cases/connection_pool_test.rb:84:in `ensure in test_remove_connection_for_thread'
test/cases/connection_pool_test.rb:84:in `test_remove_connection_for_thread'
/Volumes/Data/Users/alexey/.rvm/gems/ruby-1.9.3-p0/gems/mocha-0.10.0/lib/mocha/integration/mini_test/version_230_to_251.rb:28:in `run'

9 tests, 22 assertions, 0 failures, 1 errors, 0 skips
```

and on the fourth time:

```shell
Using postgresql with Identity Map off
Run options:

# Running tests:

.......EE

Finished tests in 0.139984s, 64.2931 tests/s, 135.7298 assertions/s.

1) Error:
test_remove_connection(ActiveRecord::ConnectionAdapters::ConnectionPoolTest):
NoMethodError: undefined method `close' for nil:NilClass
test/cases/connection_pool_test.rb:76:in `ensure in test_remove_connection'
test/cases/connection_pool_test.rb:76:in `test_remove_connection'
/Volumes/Data/Users/alexey/.rvm/gems/ruby-1.9.3-p0/gems/mocha-0.10.0/lib/mocha/integration/mini_test/version_230_to_251.rb:28:in `run'

2) Error:
test_remove_connection_for_thread(ActiveRecord::ConnectionAdapters::ConnectionPoolTest):
NoMethodError: undefined method `close' for nil:NilClass
test/cases/connection_pool_test.rb:84:in `ensure in test_remove_connection_for_thread'
test/cases/connection_pool_test.rb:84:in `test_remove_connection_for_thread'
/Volumes/Data/Users/alexey/.rvm/gems/ruby-1.9.3-p0/gems/mocha-0.10.0/lib/mocha/integration/mini_test/version_230_to_251.rb:28:in `run'

9 tests, 19 assertions, 0 failures, 2 errors, 0 skips
```

In one of my previous experiments, i've also got **another error**:

```shell
Using postgresql with Identity Map off
Run options:

# Running tests:

........E

Finished tests in 0.141029s, 63.8167 tests/s, 155.9963 assertions/s.

1) Error:
test_remove_connection_for_thread(ActiveRecord::ConnectionAdapters::ConnectionPoolTest):
PGError: FATAL: sorry, too many clients already
```