diff --git a/spec/integration/cli/assets/precompile_spec.rb b/spec/integration/cli/assets/precompile_spec.rb index abdd3c907..774185049 100644 --- a/spec/integration/cli/assets/precompile_spec.rb +++ b/spec/integration/cli/assets/precompile_spec.rb @@ -50,7 +50,10 @@ class Dashboard # # Verify manifest # - manifest = File.read("public/assets.json") + manifest = retry_exec(Errno::ENOENT) do + File.read("public/assets.json") + end + expect(JSON.parse(manifest)).to be_kind_of(Hash) # assert it's a well-formed JSON expect(manifest).to include(%("/assets/admin/dashboard.js":{"target":"/assets/admin/dashboard-39744f9626a70683b6c2d46305798883.js","sri":["sha256-1myPVWoqrq+uAVP2DSkmAown+5dm0x61+E3AjlGOKEc="]})) diff --git a/spec/support/retry.rb b/spec/support/retry.rb index 9c02a16c1..52fd5a94b 100644 --- a/spec/support/retry.rb +++ b/spec/support/retry.rb @@ -10,7 +10,7 @@ def retry_exec(exception, &blk) sleep 1 blk.call # rubocop:disable Performance/RedundantBlockCall rescue exception - raise if attempts > 3 + raise if attempts > 10 attempts += 1 retry end