1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Reset schema cache after test

Currently, `test_copy_table_with_composite_primary_keys` test fails
depending on execution order. The reproduction step is as follows.

```
$ ARCONN=sqlite3_mem bin/test -w -n "/^(?:CalculationsTest#(?:test_#skip_query_cache\\!_for_a_simple_calculation)|PrimaryKeyAnyTypeTest#(?:test_any_type_primary_key)|ActiveRecord::ConnectionAdapters::SQLite3AdapterTest#(?:test_copy_table_with_composite_primary_keys))$/" --seed 41545
```

The column info is cached by `PrimaryKeyAnyTypeTest#test_any_type_primary_key`,
and the test seems to have failed due to the influence.
So clear cache after testing so as not to affect other tests.

Related: https://travis-ci.org/rails/rails/jobs/313730163#L1788
This commit is contained in:
yuuji.yaginuma 2017-12-10 11:58:41 +09:00 committed by Yuji Yaginuma
parent 1b24fb213b
commit cf0fcbe7f6

View file

@ -298,6 +298,8 @@ class PrimaryKeyAnyTypeTest < ActiveRecord::TestCase
assert_not column.null
assert_equal :string, column.type
assert_equal 42, column.limit
ensure
Barcode.reset_column_information
end
test "schema dump primary key includes type and options" do