Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Flaky spec] spec/models/variant_override_spec.rb:36 #5735

Closed
luisramos0 opened this issue Jul 6, 2020 · 1 comment · Fixed by #7788
Closed

[Flaky spec] spec/models/variant_override_spec.rb:36 #5735

luisramos0 opened this issue Jul 6, 2020 · 1 comment · Fixed by #7788
Assignees

Comments

@luisramos0
Copy link
Contributor

What we should change and why (this is tech debt)

We need to fix this flaky spec:
spec/models/variant_override_spec.rb:36


 1) VariantOverride scopes fetching variant overrides indexed by variant does not include overrides for soft-deleted variants
     Failure/Error: expect(VariantOverride.indexed(hub1)).to eq( nil => vo1 )
     
       expected: {nil=>#<VariantOverride id: 103, variant_id: 1726, hub_id: 809, price: #<BigDecimal:7f4a51f789e0,'0.7... false, sku: nil, on_demand: false, permission_revoked_at: nil, import_date: "2020-07-05 18:29:46">}
            got: {#<Spree::Variant id: 1726, sku: "17c1775c0a88105c5659e93770ceeb70", weight: #<BigDecimal:7f4a672e0ca... false, sku: nil, on_demand: false, permission_revoked_at: nil, import_date: "2020-07-05 18:29:46">}
     
       (compared using ==)
     
       Diff:
       @@ -1,2 +1,2 @@
       -nil => #<VariantOverride id: 103, variant_id: 1726, hub_id: 809, price: #<BigDecimal:7f4a51f789e0,'0.7777E2',18(36)>, count_on_hand: 11111, default_stock: 2000, resettable: false, sku: nil, on_demand: false, permission_revoked_at: nil, import_date: "2020-07-05 18:29:46">,
       +#<Spree::Variant id: 1726, sku: "17c1775c0a88105c5659e93770ceeb70", weight: #<BigDecimal:7f4a672e0ca8,'0.0',9(18)>, height: #<BigDecimal:7f4a672e0b40,'0.7288E2',18(18)>, width: #<BigDecimal:7f4a672e0988,'0.14646E3',18(18)>, depth: #<BigDecimal:7f4a672e0898,'0.12656E3',18(18)>, deleted_at: "2020-07-06 18:29:46", is_master: false, product_id: 671, cost_price: #<BigDecimal:7f4a672e0190,'0.17E2',9(18)>, position: 3, cost_currency: "AUD", unit_value: 1.0, unit_description: "", display_name: nil, display_as: nil, import_date: nil> => #<VariantOverride id: 103, variant_id: 1726, hub_id: 809, price: #<BigDecimal:7f4a5dfaa3d0,'0.7777E2',18(18)>, count_on_hand: 11111, default_stock: 2000, resettable: false, sku: nil, on_demand: false, permission_revoked_at: nil, import_date: "2020-07-05 18:29:46">,
       
     # ./spec/models/variant_override_spec.rb:38:in `block (4 levels) in <top (required)>'

Last seen on job 2 here:
https://semaphoreci.com/openfoodfoundation/openfoodnetwork-2/branches/master/builds/1562

Context

Impact and timeline

@Matt-Yorkley Matt-Yorkley self-assigned this Jul 6, 2020
@Matt-Yorkley Matt-Yorkley changed the title [Flaky spec] spec/features/consumer/shopping/orders_spec.rb:43 [Flaky spec] spec/models/variant_override_spec.rb:36 Jul 6, 2020
@Matt-Yorkley Matt-Yorkley removed their assignment Jul 8, 2020
@Matt-Yorkley
Copy link
Contributor

I can't replicate this locally. I had a couple of different tries at this, but it's still flaky in Semaphore...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants