From 38f0277e16232332fc75256e46050e25aeb02bbe Mon Sep 17 00:00:00 2001 From: Aidan Haran Date: Tue, 7 Nov 2023 16:28:00 +0000 Subject: [PATCH] Indicate if SQL Server CI test run --- docker-compose.ci.yml | 2 +- test/cases/transaction_test_sqlserver.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.ci.yml b/docker-compose.ci.yml index e93c89d45..090e93bd2 100644 --- a/docker-compose.ci.yml +++ b/docker-compose.ci.yml @@ -5,7 +5,7 @@ services: ci: environment: - ACTIVERECORD_UNITTEST_HOST=sqlserver - - CI=true + - SQLSERVER_CI=true build: context: . dockerfile: Dockerfile.ci diff --git a/test/cases/transaction_test_sqlserver.rb b/test/cases/transaction_test_sqlserver.rb index 4839e9f5b..cd8a4764e 100644 --- a/test/cases/transaction_test_sqlserver.rb +++ b/test/cases/transaction_test_sqlserver.rb @@ -54,7 +54,7 @@ class TransactionTestSQLServer < ActiveRecord::TestCase describe "when READ_COMMITTED_SNAPSHOT is set" do it "should use READ COMMITTED as an isolation level" do - skip "This test sometimes causes subsequent tests to fail with error 'DBPROCESS is dead or not enabled'. The test passes if run alone." if ENV["CI"] + skip "This test sometimes causes subsequent tests to fail with error 'DBPROCESS is dead or not enabled'. The test passes if run alone." if ENV["SQLSERVER_CI"] connection.execute "ALTER DATABASE [#{connection.current_database}] SET ALLOW_SNAPSHOT_ISOLATION ON" connection.execute "ALTER DATABASE [#{connection.current_database}] SET READ_COMMITTED_SNAPSHOT ON WITH ROLLBACK IMMEDIATE"