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

An Opportunity is leased even though the C1 request fails #169

Open
lukehesluke opened this issue Oct 7, 2021 · 0 comments
Open

An Opportunity is leased even though the C1 request fails #169

lukehesluke opened this issue Oct 7, 2021 · 0 comments

Comments

@lukehesluke
Copy link
Contributor

lukehesluke commented Oct 7, 2021

Assumption: C1 is atomic. With the anonymous-leasing feature enabled, if a C1 request with multiple OrderItems is attempted and it fails due to one of the items, NONE of the items get leased and therefore NONE of the items has its capacity reduced in the Opportunity feeds

This is not the observed behaviour. In the attached run:

availability-check_opportunity-full_OpenBookingSimpleFlow_Multiple.md

  1. Test Suite made a C1 request where OrderItems 0, 1, 3 & 4 failed due to having 0 capacity. This is correct of course ✅ . OrderItems 2 & 5 are bookable due to having 10 spaces, but still the overall Order failed
  2. Then, when AssertCapacity.. stage expects NONE of the capacities to have changed, it finds that in fact the capacities of OrderItems 2 & 5 have been reduced from 10 -> 9 implying that they were leased even though the OrderQuote failed to create ❌

Acceptance Criteria

When working on this, be sure to use a coverage/* branch (more info about coverage branches) and start a branch in Test Suite with the same name.

In this branch on Test Suite, search for all instances of https://github.com/openactive/OpenActive.Server.NET/issues/169 in the code. Here's an example of one:

https://github.com/openactive/openactive-test-suite/blob/e92f7ab1f89ac4a7b9a818e6bd0763eb58876d43/packages/openactive-integration-tests/test/helpers/flow-stages/flow-stage-recipes.js#L170-L171

Update it so that the comment and the doSkip line (which includes RUN_TESTS_WHICH_FAIL_REFIMPL) are removed for each instance. The effect of this will be turning on the post-OrderQuote-amendment capacity checks in Test Suite.

The acceptance criteria is that this branch of Test Suite passes against the OpenActive.Server.Net branch


This was revealed while working on this Test Suite issue: openactive/openactive-test-suite#460

@lukehesluke lukehesluke changed the title An Opportunity is leased even when the C1 request fails An Opportunity is leased even though the C1 request fails Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant