diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2017-07-17 15:06:38 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2017-07-17 16:20:58 +0900 |
commit | 1701709e7f87520a07eed87dec1570be13584f72 (patch) | |
tree | 63a7c303b2f838f2630d87595a6c312883aed772 /activerecord/test/cases/adapters/postgresql/serial_test.rb | |
parent | d87fbf75abd368fef33f1f01024623f32881b2d2 (diff) | |
download | rails-1701709e7f87520a07eed87dec1570be13584f72.tar.gz rails-1701709e7f87520a07eed87dec1570be13584f72.tar.bz2 rails-1701709e7f87520a07eed87dec1570be13584f72.zip |
Move `reset_pk_sequence!` test to `AdapterTestWithoutTransaction`
If execute PostgreSQL test with specifying 53853 for seed, the following
error will occur.
```
1) Error:
TransactionTest#test_restore_custom_primary_key_after_rollback:
ActiveRecord::RecordNotUnique: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "movies_pkey"
DETAIL: Key (movieid)=(2) already exists.
: INSERT INTO "movies" ("name") VALUES ($1) RETURNING "movieid"
```
travis is here https://travis-ci.org/rails/rails/jobs/254095918
As with #29287, it seems like a problem that the value of primary key
obtained from connection gets different.
Therefore, fixed to execute that test within transaction.
Diffstat (limited to 'activerecord/test/cases/adapters/postgresql/serial_test.rb')
0 files changed, 0 insertions, 0 deletions