From e03a9fd0be09586135a1d3a621e1485ee9ae74e0 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Wed, 25 Sep 2024 22:32:51 +0800 Subject: [PATCH] tests: add an extra byte of randomness Two bytes should hopefully be plenty. --- Library/Homebrew/test/support/lib/startup/config.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/test/support/lib/startup/config.rb b/Library/Homebrew/test/support/lib/startup/config.rb index 5cd7e92866..6891a9a11b 100644 --- a/Library/Homebrew/test/support/lib/startup/config.rb +++ b/Library/Homebrew/test/support/lib/startup/config.rb @@ -19,7 +19,7 @@ end.freeze # Use a shorter HOMEBREW_TEMP path so Sequoia doesn't error out as often on long paths (> 104 bytes). # Use the minimal amount of randomness to avoid collisions while allowing parallel tests. require "securerandom" -random_hex = SecureRandom.hex(1) +random_hex = SecureRandom.hex(2) HOMEBREW_TEMP = Pathname("#{homebrew_temp}/brewtests#{random_hex}".squeeze("/")).freeze HOMEBREW_TEMP.mkpath