From 78ee332dbdbe0e58aa34521d57bf605ca2a3216f Mon Sep 17 00:00:00 2001 From: Keith Doggett Date: Tue, 6 Jul 2021 18:38:17 -0400 Subject: [PATCH] Change referenced issue in create_unlogged_tables_test and remove test override. --- test/cases/create_unlogged_tables_test.rb | 16 ++-------------- test/excludes/CommentTest.rb | 2 +- test/excludes/UnloggedTablesTest.rb | 3 +-- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/test/cases/create_unlogged_tables_test.rb b/test/cases/create_unlogged_tables_test.rb index 4ff128af..e3f4fa87 100644 --- a/test/cases/create_unlogged_tables_test.rb +++ b/test/cases/create_unlogged_tables_test.rb @@ -34,9 +34,8 @@ def setup ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.create_unlogged_tables = false end - # Cockroachdb has an issue about `pg_class` - # https://github.com/cockroachdb/cockroach/issues/56656 - # This override can be removed after it be fix + # Cockroachdb ignores the UNLOGGED specifier. + # https://github.com/cockroachdb/cockroach/issues/56827 def test_unlogged_in_test_environment_when_unlogged_setting_enabled ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.create_unlogged_tables = true @@ -44,17 +43,6 @@ def test_unlogged_in_test_environment_when_unlogged_setting_enabled end assert_equal @connection.execute(LOGGED_QUERY).first[LOGGED_FIELD], LOGGED end - - # Cockroachdb has an issue about `pg_class` - # https://github.com/cockroachdb/cockroach/issues/56656 - # This override can be removed after it be fix - def test_gracefully_handles_temporary_tables - @connection.execute("SET experimental_enable_temp_tables = 'on';") - @connection.create_table(TABLE_NAME, temporary: true) do |t| - end - - assert_equal @connection.execute(LOGGED_QUERY).first[LOGGED_FIELD], TEMPORARY - end end end end diff --git a/test/excludes/CommentTest.rb b/test/excludes/CommentTest.rb index 0970dd09..04b7f795 100644 --- a/test/excludes/CommentTest.rb +++ b/test/excludes/CommentTest.rb @@ -1,2 +1,2 @@ exclude :test_remove_comment_from_column, "The test fails because altered columns cannot change comments. We implement our own version." -exclude :test_schema_dump_with_comments, "The test fails because altered columns cannot change comments. We implement our own version." \ No newline at end of file +exclude :test_schema_dump_with_comments, "The test fails because altered columns cannot change comments. We implement our own version." diff --git a/test/excludes/UnloggedTablesTest.rb b/test/excludes/UnloggedTablesTest.rb index 192e8cc5..6b0f7b13 100644 --- a/test/excludes/UnloggedTablesTest.rb +++ b/test/excludes/UnloggedTablesTest.rb @@ -1,2 +1 @@ -exclude :test_gracefully_handles_temporary_tables, "This override can be removed after it be fix. Related https://github.com/cockroachdb/cockroach/issues/56656" -exclude :test_unlogged_in_test_environment_when_unlogged_setting_enabled, "This override can be removed after it be fix. Related https://github.com/cockroachdb/cockroach/issues/56656" +exclude :test_unlogged_in_test_environment_when_unlogged_setting_enabled, "Override because UNLOGGED cannot be specified in CockroachDB. Related https://github.com/cockroachdb/cockroach/issues/56827"