From f8034c23e5d71a4109443eaf1ff45eef43aefa1b Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Thu, 10 Oct 2024 22:18:01 +0200 Subject: [PATCH] Fix flaky conversion tests --- test/test_helper.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/test_helper.rb b/test/test_helper.rb index ba64b267..7a907b06 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -23,6 +23,10 @@ class ActiveSupport::TestCase parallelize(workers: :number_of_processors) parallelize_setup do |worker| + # Make sure each worker has it's own base path for conversion testing. Sadly + # we can't do this in config/environment/test.rb :( + TranscodedItem.class.define_method :codec_conversion_base_path, + ->(codec_conversion) { File.join(TranscodedItem::BASE_PATH, worker, codec_conversion.id) } SimpleCov.command_name "#{SimpleCov.command_name}-#{worker}" end