From d4d894111774b3542fb622e64f344683835181ca Mon Sep 17 00:00:00 2001 From: filipefurtad0 Date: Wed, 26 Jul 2023 11:49:41 +0100 Subject: [PATCH 1/2] Reverts #11019 As discussed here (https://github.com/openfoodfoundation/openfoodnetwork/issues/11010#issuecomment-1594153860), reset_spree_preferences already does Rails.cache.clear --- spec/system/consumer/caching/shops_caching_spec.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/spec/system/consumer/caching/shops_caching_spec.rb b/spec/system/consumer/caching/shops_caching_spec.rb index 11edcc667e..128adab602 100644 --- a/spec/system/consumer/caching/shops_caching_spec.rb +++ b/spec/system/consumer/caching/shops_caching_spec.rb @@ -13,11 +13,6 @@ describe "Shops caching", caching: true do create(:open_order_cycle, distributors: [distributor], coordinator: distributor) } - around do |example| - Rails.cache.clear - example.run - end - describe "caching enterprises AMS data" do it "caches data for all enterprises, with the provided options" do visit shops_path From 83f1266b8a49d1796b2b3a05336289d047fbaa80 Mon Sep 17 00:00:00 2001 From: filipefurtad0 Date: Wed, 26 Jul 2023 11:51:08 +0100 Subject: [PATCH 2/2] Comments out flaky example Sets example to xit pending is not suitable for flaky specs, as we'll get a red build anyway, each time the spec passes; commenting out should be the right approach till we fix this one --- spec/system/consumer/caching/shops_caching_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/system/consumer/caching/shops_caching_spec.rb b/spec/system/consumer/caching/shops_caching_spec.rb index 128adab602..35261ee46c 100644 --- a/spec/system/consumer/caching/shops_caching_spec.rb +++ b/spec/system/consumer/caching/shops_caching_spec.rb @@ -14,7 +14,9 @@ describe "Shops caching", caching: true do } describe "caching enterprises AMS data" do - it "caches data for all enterprises, with the provided options" do + xit "caches data for all enterprises, with the provided options" do + pending "#11010" + visit shops_path key, options = CacheService::FragmentCaching.ams_shops