test_should_destroy_marked_childs_before_new_child_savings results output
ruby -Itest:lib /Users/pftg/dev/rails/activerecord/test/cases/autosave_association_test.rb --name=test_should_destroy_marked_childs_before_new_child_savings
Testing started at 11:45 AM ...
Using postgresql
Run options: --name=test_should_destroy_marked_childs_before_new_child_savings --seed 7999
# Running tests:
E
Finished tests in 0.097594s, 10.2465 tests/s, 0.0000 assertions/s.
1) Error:
TestDestroyAsPartOfAutosaveAssociation#test_should_destroy_marked_childs_before_new_child_savings:
ActiveRecord::RecordNotUnique: PG::Error: ERROR: duplicate key value violates unique constraint "unique_birds_index"
DETAIL: Key (name, color)=(Parrot, Colorful) already exists.
: INSERT INTO "birds" ("color", "name", "pirate_id") VALUES ($1, $2, $3) RETURNING "id"
/Users/pftg/dev/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:743:in `get_last_result'
/Users/pftg/dev/rails/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:743:in `exec_cache'
/Users/pftg/dev/rails/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb:139:in `block in exec_query'
/Users/pftg/dev/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:345:in `block in log'
/Users/pftg/dev/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/pftg/dev/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:340:in `log'
/Users/pftg/dev/rails/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb:137:in `exec_query'
/Users/pftg/dev/rails/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb:183:in `exec_insert'
/Users/pftg/dev/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:96:in `insert'
/Users/pftg/dev/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `insert'
/Users/pftg/dev/rails/activerecord/lib/active_record/relation.rb:76:in `insert'
/Users/pftg/dev/rails/activerecord/lib/active_record/persistence.rb:456:in `create_record'
/Users/pftg/dev/rails/activerecord/lib/active_record/attribute_methods/dirty.rb:78:in `create_record'
/Users/pftg/dev/rails/activerecord/lib/active_record/callbacks.rb:303:in `block in create_record'
/Users/pftg/dev/rails/activesupport/lib/active_support/callbacks.rb:374:in `_run__1978441874184234870__create__callbacks'
/Users/pftg/dev/rails/activesupport/lib/active_support/callbacks.rb:78:in `run_callbacks'
/Users/pftg/dev/rails/activerecord/lib/active_record/callbacks.rb:303:in `create_record'
/Users/pftg/dev/rails/activerecord/lib/active_record/timestamp.rb:57:in `create_record'
/Users/pftg/dev/rails/activerecord/lib/active_record/persistence.rb:424:in `create_or_update'
/Users/pftg/dev/rails/activerecord/lib/active_record/callbacks.rb:299:in `block in create_or_update'
/Users/pftg/dev/rails/activesupport/lib/active_support/callbacks.rb:394:in `_run__1978441874184234870__save__callbacks'
/Users/pftg/dev/rails/activesupport/lib/active_support/callbacks.rb:78:in `run_callbacks'
/Users/pftg/dev/rails/activerecord/lib/active_record/callbacks.rb:299:in `create_or_update'
/Users/pftg/dev/rails/activerecord/lib/active_record/persistence.rb:103:in `save'
/Users/pftg/dev/rails/activerecord/lib/active_record/validations.rb:51:in `save'
/Users/pftg/dev/rails/activerecord/lib/active_record/attribute_methods/dirty.rb:32:in `save'
/Users/pftg/dev/rails/activerecord/lib/active_record/transactions.rb:270:in `block (2 levels) in save'
/Users/pftg/dev/rails/activerecord/lib/active_record/transactions.rb:326:in `block in with_transaction_returning_status'
/Users/pftg/dev/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:200:in `transaction'
/Users/pftg/dev/rails/activerecord/lib/active_record/transactions.rb:209:in `transaction'
/Users/pftg/dev/rails/activerecord/lib/active_record/transactions.rb:323:in `with_transaction_returning_status'
/Users/pftg/dev/rails/activerecord/lib/active_record/transactions.rb:270:in `block in save'
/Users/pftg/dev/rails/activerecord/lib/active_record/transactions.rb:281:in `rollback_active_record_state!'
/Users/pftg/dev/rails/activerecord/lib/active_record/transactions.rb:269:in `save'
/Users/pftg/dev/rails/activerecord/lib/active_record/associations/has_many_association.rb:39:in `insert_record'
/Users/pftg/dev/rails/activerecord/lib/active_record/autosave_association.rb:334:in `block in save_collection_association'
/Users/pftg/dev/rails/activerecord/lib/active_record/autosave_association.rb:325:in `each'
/Users/pftg/dev/rails/activerecord/lib/active_record/autosave_association.rb:325:in `save_collection_association'
/Users/pftg/dev/rails/activerecord/lib/active_record/autosave_association.rb:182:in `block in add_autosave_association_callbacks'
/Users/pftg/dev/rails/activerecord/lib/active_record/autosave_association.rb:152:in `instance_eval'
/Users/pftg/dev/rails/activerecord/lib/active_record/autosave_association.rb:152:in `block in define_non_cyclic_method'
/Users/pftg/dev/rails/activesupport/lib/active_support/callbacks.rb:412:in `_run__3703955497237269224__update__callbacks'
/Users/pftg/dev/rails/activesupport/lib/active_support/callbacks.rb:78:in `run_callbacks'
/Users/pftg/dev/rails/activerecord/lib/active_record/callbacks.rb:307:in `update_record'
/Users/pftg/dev/rails/activerecord/lib/active_record/timestamp.rb:70:in `update_record'
/Users/pftg/dev/rails/activerecord/lib/active_record/persistence.rb:424:in `create_or_update'
/Users/pftg/dev/rails/activerecord/lib/active_record/callbacks.rb:299:in `block in create_or_update'
/Users/pftg/dev/rails/activesupport/lib/active_support/callbacks.rb:414:in `_run__3703955497237269224__save__callbacks'
/Users/pftg/dev/rails/activesupport/lib/active_support/callbacks.rb:78:in `run_callbacks'
/Users/pftg/dev/rails/activerecord/lib/active_record/callbacks.rb:299:in `create_or_update'
/Users/pftg/dev/rails/activerecord/lib/active_record/persistence.rb:122:in `save!'
/Users/pftg/dev/rails/activerecord/lib/active_record/validations.rb:57:in `save!'
/Users/pftg/dev/rails/activerecord/lib/active_record/attribute_methods/dirty.rb:41:in `save!'
/Users/pftg/dev/rails/activerecord/lib/active_record/transactions.rb:275:in `block in save!'
/Users/pftg/dev/rails/activerecord/lib/active_record/transactions.rb:326:in `block in with_transaction_returning_status'
/Users/pftg/dev/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:202:in `block in transaction'
/Users/pftg/dev/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:210:in `within_new_transaction'
/Users/pftg/dev/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:202:in `transaction'
/Users/pftg/dev/rails/activerecord/lib/active_record/transactions.rb:209:in `transaction'
/Users/pftg/dev/rails/activerecord/lib/active_record/transactions.rb:323:in `with_transaction_returning_status'
/Users/pftg/dev/rails/activerecord/lib/active_record/transactions.rb:275:in `save!'
/Users/pftg/dev/rails/activerecord/test/cases/autosave_association_test.rb:766:in `test_should_destroy_marked_childs_before_new_child_savings'
% ruby -Itest:lib /Users/pftg/dev/rails/activerecord/test/cases/autosave_association_test.rb --name=test_should_destroy_marked_childs_before_new_child_savings
Using sqlite3
Run options: --name=test_should_destroy_marked_childs_before_new_child_savings --seed 9515
# Running tests:
E
Finished tests in 0.074167s, 13.4831 tests/s, 0.0000 assertions/s.
1) Error:
TestDestroyAsPartOfAutosaveAssociation#test_should_destroy_marked_childs_before_new_child_savings:
ActiveRecord::StatementInvalid: SQLite3::ConstraintException: constraint failed: INSERT INTO "birds" ("color", "name", "pirate_id") VALUES (?, ?, ?)
/Users/pftg/.rvm/gems/ruby-1.9.3-p385/gems/sqlite3-1.3.7/lib/sqlite3/statement.rb:108:in `step'
/Users/pftg/.rvm/gems/ruby-1.9.3-p385/gems/sqlite3-1.3.7/lib/sqlite3/statement.rb:108:in `block in each'
/Users/pftg/.rvm/gems/ruby-1.9.3-p385/gems/sqlite3-1.3.7/lib/sqlite3/statement.rb:107:in `loop'
/Users/pftg/.rvm/gems/ruby-1.9.3-p385/gems/sqlite3-1.3.7/lib/sqlite3/statement.rb:107:in `each'
/Users/pftg/dev/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb:313:in `to_a'
/Users/pftg/dev/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb:313:in `block in exec_query'
/Users/pftg/dev/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:345:in `block in log'
/Users/pftg/dev/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/pftg/dev/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:340:in `log'
/Users/pftg/dev/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb:292:in `exec_query'
/Users/pftg/dev/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:69:in `exec_insert'
/Users/pftg/dev/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:96:in `insert'
/Users/pftg/dev/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `insert'
/Users/pftg/dev/rails/activerecord/lib/active_record/relation.rb:76:in `insert'
/Users/pftg/dev/rails/activerecord/lib/active_record/persistence.rb:456:in `create_record'
/Users/pftg/dev/rails/activerecord/lib/active_record/attribute_methods/dirty.rb:78:in `create_record'
/Users/pftg/dev/rails/activerecord/lib/active_record/callbacks.rb:303:in `block in create_record'
/Users/pftg/dev/rails/activesupport/lib/active_support/callbacks.rb:374:in `_run__459114706360002668__create__callbacks'
/Users/pftg/dev/rails/activesupport/lib/active_support/callbacks.rb:78:in `run_callbacks'
/Users/pftg/dev/rails/activerecord/lib/active_record/callbacks.rb:303:in `create_record'
/Users/pftg/dev/rails/activerecord/lib/active_record/timestamp.rb:57:in `create_record'
/Users/pftg/dev/rails/activerecord/lib/active_record/persistence.rb:424:in `create_or_update'
/Users/pftg/dev/rails/activerecord/lib/active_record/callbacks.rb:299:in `block in create_or_update'
/Users/pftg/dev/rails/activesupport/lib/active_support/callbacks.rb:394:in `_run__459114706360002668__save__callbacks'
/Users/pftg/dev/rails/activesupport/lib/active_support/callbacks.rb:78:in `run_callbacks'
/Users/pftg/dev/rails/activerecord/lib/active_record/callbacks.rb:299:in `create_or_update'
/Users/pftg/dev/rails/activerecord/lib/active_record/persistence.rb:103:in `save'
/Users/pftg/dev/rails/activerecord/lib/active_record/validations.rb:51:in `save'
/Users/pftg/dev/rails/activerecord/lib/active_record/attribute_methods/dirty.rb:32:in `save'
/Users/pftg/dev/rails/activerecord/lib/active_record/transactions.rb:270:in `block (2 levels) in save'
/Users/pftg/dev/rails/activerecord/lib/active_record/transactions.rb:326:in `block in with_transaction_returning_status'
/Users/pftg/dev/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:200:in `transaction'
/Users/pftg/dev/rails/activerecord/lib/active_record/transactions.rb:209:in `transaction'
/Users/pftg/dev/rails/activerecord/lib/active_record/transactions.rb:323:in `with_transaction_returning_status'
/Users/pftg/dev/rails/activerecord/lib/active_record/transactions.rb:270:in `block in save'
/Users/pftg/dev/rails/activerecord/lib/active_record/transactions.rb:281:in `rollback_active_record_state!'
/Users/pftg/dev/rails/activerecord/lib/active_record/transactions.rb:269:in `save'
/Users/pftg/dev/rails/activerecord/lib/active_record/associations/has_many_association.rb:39:in `insert_record'
/Users/pftg/dev/rails/activerecord/lib/active_record/autosave_association.rb:334:in `block in save_collection_association'
/Users/pftg/dev/rails/activerecord/lib/active_record/autosave_association.rb:325:in `each'
/Users/pftg/dev/rails/activerecord/lib/active_record/autosave_association.rb:325:in `save_collection_association'
/Users/pftg/dev/rails/activerecord/lib/active_record/autosave_association.rb:182:in `block in add_autosave_association_callbacks'
/Users/pftg/dev/rails/activerecord/lib/active_record/autosave_association.rb:152:in `instance_eval'
/Users/pftg/dev/rails/activerecord/lib/active_record/autosave_association.rb:152:in `block in define_non_cyclic_method'
/Users/pftg/dev/rails/activesupport/lib/active_support/callbacks.rb:412:in `_run__2223415804250326597__update__callbacks'
/Users/pftg/dev/rails/activesupport/lib/active_support/callbacks.rb:78:in `run_callbacks'
/Users/pftg/dev/rails/activerecord/lib/active_record/callbacks.rb:307:in `update_record'
/Users/pftg/dev/rails/activerecord/lib/active_record/timestamp.rb:70:in `update_record'
/Users/pftg/dev/rails/activerecord/lib/active_record/persistence.rb:424:in `create_or_update'
/Users/pftg/dev/rails/activerecord/lib/active_record/callbacks.rb:299:in `block in create_or_update'
/Users/pftg/dev/rails/activesupport/lib/active_support/callbacks.rb:414:in `_run__2223415804250326597__save__callbacks'
/Users/pftg/dev/rails/activesupport/lib/active_support/callbacks.rb:78:in `run_callbacks'
/Users/pftg/dev/rails/activerecord/lib/active_record/callbacks.rb:299:in `create_or_update'
/Users/pftg/dev/rails/activerecord/lib/active_record/persistence.rb:122:in `save!'
/Users/pftg/dev/rails/activerecord/lib/active_record/validations.rb:57:in `save!'
/Users/pftg/dev/rails/activerecord/lib/active_record/attribute_methods/dirty.rb:41:in `save!'
/Users/pftg/dev/rails/activerecord/lib/active_record/transactions.rb:275:in `block in save!'
/Users/pftg/dev/rails/activerecord/lib/active_record/transactions.rb:326:in `block in with_transaction_returning_status'
/Users/pftg/dev/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:202:in `block in transaction'
/Users/pftg/dev/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:210:in `within_new_transaction'
/Users/pftg/dev/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:202:in `transaction'
/Users/pftg/dev/rails/activerecord/lib/active_record/transactions.rb:209:in `transaction'
/Users/pftg/dev/rails/activerecord/lib/active_record/transactions.rb:323:in `with_transaction_returning_status'
/Users/pftg/dev/rails/activerecord/lib/active_record/transactions.rb:275:in `save!'
/Users/pftg/dev/rails/activerecord/test/cases/autosave_association_test.rb:766:in `test_should_destroy_marked_childs_before_new_child_savings'
1 tests, 0 assertions, 0 failures, 1 errors, 0 skips