Skip to content

Change the testing API /api/testing/vaccinations-search-in-nhs to a polling approach#6763

Open
benilovj wants to merge 1 commit intonextfrom
fix-vaccinations-search-in-nhs-async
Open

Change the testing API /api/testing/vaccinations-search-in-nhs to a polling approach#6763
benilovj wants to merge 1 commit intonextfrom
fix-vaccinations-search-in-nhs-async

Conversation

@benilovj
Copy link
Copy Markdown
Collaborator

@benilovj benilovj commented May 1, 2026

Unfortunately the synchronous approach was too simplistic. In E2E test runs on the QA environment, we're seeing 504 timeouts as it's likely that the synchronous testing API endpoint is taking too long for the search jobs to drain.

Instead, move to an approach whereby:

  • the test starts with a POST and receives a 202
  • it then polls with a GET
  • if the queue hasn't drained yet, status 202 is returned
  • otherwise (when the search queue is finally empty) status 200 is returned

See NHSDigital/manage-vaccinations-in-schools-testing#1164

…olling

Unfortunately the synchronous approach was too simplistic. In E2E test runs
on the QA environment, we're seeing 504 timeouts as it's likely that the
synchronous testing API endpoint is taking too long for the search jobs
to drain.

Instead, move to an approach whereby:
* the test starts with a POST and receives a 202
* it then polls with a GET
* if the queue hasn't drained yet, status 202 is returned
* otherwise (when the search queue is finally empty) status 200 is returned
@benilovj benilovj force-pushed the fix-vaccinations-search-in-nhs-async branch from 47b3aa3 to a020b72 Compare May 1, 2026 21:33
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

Successfully merging this pull request may close these issues.

1 participant