From b612ccbae2f6102cac8549e07ac0c90ed53515f3 Mon Sep 17 00:00:00 2001 From: Ivan Kuchin Date: Tue, 20 Feb 2024 18:36:50 +0100 Subject: [PATCH] set allow_concurrency to false in test config Prevent race condition with session modification that causes flaky test. There should be a better solution as the requests that are made in parallel are not supposed to modify session. This reverts commit 24d5ed2f5548ae515b2bd2cda55e78aea865cb44. --- config/environments/test.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/environments/test.rb b/config/environments/test.rb index aafe1499fe6f..633015bbdebc 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -50,6 +50,10 @@ # loading is working properly before deploying your code. config.eager_load = %w[CI EAGER_LOAD].any? { |name| ENV[name].present? } + # Prevent race condition with session modification, when not set this is equal + # to allowing concurrency + config.allow_concurrency = false + # Configure public file server for tests with Cache-Control for performance. config.public_file_server.enabled = true config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }