Skip to content

Commit

Permalink
Fix licence agreement tear down again! (#675)
Browse files Browse the repository at this point in the history
https://eaflood.atlassian.net/browse/WATER-4336

Ok, we've made a bit of a hash with trying to [improve the tear-down speed](#671).

We realised in the rewrite we'd dropped a licence agreement DELETE statement that needed including so [fixed it](https://github.com/DEFRA/water-abstraction-system/pull/673/files).

Then we realised the tear-down was now faster but more flaky so [switched to the single query strategy](#674).

Only in the switch what do you know, we lost the licence agreement DELETE statement again.

Hopefully, for the last time, we fix this!
  • Loading branch information
Cruikshanks authored Jan 21, 2024
1 parent 7a80417 commit b3af00c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/services/data/tear-down/water-schema.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,14 @@ async function _deleteAllTestData () {
WHERE
"is_test" = TRUE;
DELETE
FROM
"water"."licence_agreements" AS "la"
USING "water"."licences" AS "l"
WHERE
"l"."is_test" = TRUE
AND "la"."licence_ref" = "l"."licence_ref";
DELETE
FROM
"water"."financial_agreement_types"
Expand Down

0 comments on commit b3af00c

Please sign in to comment.