From 2baad93f71decc1cae1ed034523c0d356a57a4b6 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sat, 1 Aug 2026 04:53:19 +0000 Subject: [PATCH] test: retry municipality pair when word-start queries collide MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allocator stays slug-free (miss #73); skips Conde/Condeúba-style prefixes. --- tests/int/searchStaffMunicipalityHits.int.spec.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/int/searchStaffMunicipalityHits.int.spec.ts b/tests/int/searchStaffMunicipalityHits.int.spec.ts index 403130e1..46022c18 100644 --- a/tests/int/searchStaffMunicipalityHits.int.spec.ts +++ b/tests/int/searchStaffMunicipalityHits.int.spec.ts @@ -49,7 +49,11 @@ describe('searchStaffMunicipalityHits (B60)', () => { const administered = await fixtures.getMunicipality() let other = await fixtures.getMunicipality() +<<<<<<< HEAD for (let attempt = 0; attempt < 30; attempt++) { +======= + for (let attempt = 0; attempt < 24; attempt += 1) { +>>>>>>> 8e4385e (test: retry municipality pair when word-start queries collide) try { distinctWordStartQuery(other.name, administered.name) distinctWordStartQuery(administered.name, other.name) @@ -57,15 +61,21 @@ describe('searchStaffMunicipalityHits (B60)', () => { } catch { other = await fixtures.getMunicipality() } +<<<<<<< HEAD if (attempt === 29) { throw new Error('could not allocate two municipalities with distinct word-start queries') } } await fixtures.assignMunicipalityAdvisors(administered.id, [advisor.id]) +======= + } +>>>>>>> 8e4385e (test: retry municipality pair when word-start queries collide) const otherQuery = distinctWordStartQuery(other.name, administered.name) const administeredQuery = distinctWordStartQuery(administered.name, other.name) + await fixtures.assignMunicipalityAdvisors(administered.id, [advisor.id]) + const advisorResult = await searchStaffMunicipalityHits(payload, advisor, otherQuery) expect(advisorResult.map((hit) => hit.slug)).toEqual([])