From 0c10b4c8a81b420d4c04a1bec4a5e6bded5d0de9 Mon Sep 17 00:00:00 2001 From: woksin Date: Thu, 1 Oct 2026 00:26:04 +0200 Subject: [PATCH] Use short, unique event store names in the kernel-backed specifications --- .../when_erasing_a_subject.integration.spec.ts | 2 +- .../when_replaying_an_older_generation.integration.spec.ts | 4 ++-- .../when_managing_a_replay_job.integration.spec.ts | 2 +- ...hen_registering_and_removing_a_webhook.integration.spec.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/compliance/for_PIIManager/against_a_kernel/when_erasing_a_subject.integration.spec.ts b/Source/compliance/for_PIIManager/against_a_kernel/when_erasing_a_subject.integration.spec.ts index be876a15..aade5b9c 100644 --- a/Source/compliance/for_PIIManager/against_a_kernel/when_erasing_a_subject.integration.spec.ts +++ b/Source/compliance/for_PIIManager/against_a_kernel/when_erasing_a_subject.integration.spec.ts @@ -96,7 +96,7 @@ describe.skipIf(!connectionString && !process.env.CI)('when erasing a subject ag discoveryPatterns: [], clientArtifactsProvider: artifacts })); - store = await client.getEventStore(`PiiEndToEnd${randomUUID().replaceAll('-', '')}`); + store = await client.getEventStore(`Pii${randomUUID().replaceAll('-', '').slice(0, 12)}`); // The event source is the registration; the explicit subject is the person the PII belongs to. appended = await store.eventLog.append(eventSourceId, Object.assign(new PersonRegistered(), { personId, name, department: 'Accounting' }), { subject: personId }); diff --git a/Source/events/migrations/for_EventTypeMigrators/against_a_kernel/when_replaying_an_older_generation.integration.spec.ts b/Source/events/migrations/for_EventTypeMigrators/against_a_kernel/when_replaying_an_older_generation.integration.spec.ts index 8c5f859d..927a1f3e 100644 --- a/Source/events/migrations/for_EventTypeMigrators/against_a_kernel/when_replaying_an_older_generation.integration.spec.ts +++ b/Source/events/migrations/for_EventTypeMigrators/against_a_kernel/when_replaying_an_older_generation.integration.spec.ts @@ -99,7 +99,7 @@ async function eventually(read: () => Promise, accept: (value: T) => boole } describe.skipIf(!connectionString && !process.env.CI)('when replaying an older generation against a kernel', () => { - const eventStoreName = `MigrationReplay${randomUUID().replaceAll('-', '')}`; + const eventStoreName = `Migration${randomUUID().replaceAll('-', '').slice(0, 12)}`; const eventSourceId = randomUUID(); let firstGenerationClient: ChronicleClient; let secondGenerationClient: ChronicleClient; @@ -134,7 +134,7 @@ describe.skipIf(!connectionString && !process.env.CI)('when replaying an older g // Registering a second generation without a migration from the first is rejected. const missingMigrationClient = clientWith(artifactsWith({ eventTypes: [AuthorRegisteredV1, AuthorRegistered] })); - missingMigrationError = await missingMigrationClient.getEventStore(`MigrationReplayMissing${randomUUID().replaceAll('-', '')}`).catch((error: unknown) => error); + missingMigrationError = await missingMigrationClient.getEventStore(`Missing${randomUUID().replaceAll('-', '').slice(0, 12)}`).catch((error: unknown) => error); missingMigrationClient.dispose(); }); diff --git a/Source/jobs/for_Jobs/against_a_kernel/when_managing_a_replay_job.integration.spec.ts b/Source/jobs/for_Jobs/against_a_kernel/when_managing_a_replay_job.integration.spec.ts index 57b6c42c..0187a2a7 100644 --- a/Source/jobs/for_Jobs/against_a_kernel/when_managing_a_replay_job.integration.spec.ts +++ b/Source/jobs/for_Jobs/against_a_kernel/when_managing_a_replay_job.integration.spec.ts @@ -70,7 +70,7 @@ describe.skipIf(!connectionString && !process.env.CI)('when managing a replay jo discoveryPatterns: [], clientArtifactsProvider: artifacts })); - store = await client.getEventStore(`JobsEndToEnd${randomUUID().replaceAll('-', '')}`); + store = await client.getEventStore(`Jobs${randomUUID().replaceAll('-', '').slice(0, 12)}`); // Enough events that the replay is still running when it is stopped; a stopped job stays until deleted, // where a completed one is removed and could not be listed reliably. diff --git a/Source/webhooks/for_Webhooks/against_a_kernel/when_registering_and_removing_a_webhook.integration.spec.ts b/Source/webhooks/for_Webhooks/against_a_kernel/when_registering_and_removing_a_webhook.integration.spec.ts index 9d209506..ed14f9e3 100644 --- a/Source/webhooks/for_Webhooks/against_a_kernel/when_registering_and_removing_a_webhook.integration.spec.ts +++ b/Source/webhooks/for_Webhooks/against_a_kernel/when_registering_and_removing_a_webhook.integration.spec.ts @@ -62,7 +62,7 @@ describe.skipIf(!connectionString && !process.env.CI)('when registering and remo discoveryPatterns: [], clientArtifactsProvider: artifacts })); - store = await client.getEventStore(`WebhooksEndToEnd${randomUUID().replaceAll('-', '')}`); + store = await client.getEventStore(`Webhooks${randomUUID().replaceAll('-', '').slice(0, 12)}`); await store.webhooks.register(webhookId, targetUrl, _ => _ .withEventType(OrderShipped)