提交 cf0fcbe7 编写于 作者: Y yuuji.yaginuma 提交者: Yuji Yaginuma

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
上级 1b24fb21
......@@ -298,6 +298,8 @@ def test_any_type_primary_key
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册