This project is archived and is in readonly mode.
Fix AR tests for pg on master
-
Cezary Baginski
Patch for just the transaction tests:
-
PGconn::PQTRANS_IDLE symbol was not available during loading the adaptor, so the outside_transaction? method was not overloaded.
-
Removed the symbol, since it probably was unavailable only in ruby-postgres, which is unsupported anyway
-
-
Repository
(from [8b1b273c21a2f1a6eeccca5fbe0303679c2d707d]) AR: fixed postgres transaction tests [#4519 Fix AR tests for pg on master state:commited]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net
http://github.com/rails/rails/commit/8b1b273c21a2f1a6eeccca5fbe0303... -
Cezary Baginski
Hopefully last fix, this time fixture tests:
rake test_postgresql TEST=test/cases/fixtures_test.rb1) Error: test_automatically_sets_primary_key(FoxyFixturesTest): ActiveRecord::RecordNotFound: Couldn't find Ship with ID=751016583 (snip) 74 tests, 349 assertions, 0 failures, 16 errorsThe patch:
- ships are inserted, but the transaction is rollbacked because connection.reset_pk_sequence! silently fails (because AR is silenced), because it is given the table name :"admin/account" instead of :"admin_account"
- I tried refactoring the self.create_fixtures method, but gave up, because breaking something else is too easy
- damn it took me a long time to figure out :)
- already rebased against master with the previous patch
- all postgres tests now seem to work
-
Cezary Baginski
Almost forgot about the patch ...
-
Cezary Baginski
#1748 PostgreSQL adapter and tests incorrectly detect 'postgres' driver - seems related to first problem and can probably be marked as resolved (2-3 works because transaction handling was over-simplified compared to now).
-
Jeremy Kemper
Nice - thanks Cezary!
-
Jeremy Kemper
#1748 PostgreSQL adapter and tests incorrectly detect 'postgres' driver appears unrelated - typo?
-
Repository
- State changed from new to resolved
(from [256a15c23581865559cc758c2e377cd395cc05b3]) AR: fixed postgres fixture tests [#4519 Fix AR tests for pg on master state:resolved]
Signed-off-by: Jeremy Kemper jeremy@bitsweat.net
http://github.com/rails/rails/commit/256a15c23581865559cc758c2e377c...
