Skip to content

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

Open

Description

@lukehesluke

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

Activity

  1. changed the title [-]An Opportunity is leased even when the C1 request fails[/-] [+]An Opportunity is leased even though the C1 request fails[/+] on Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions