test(core): Stabilize Sentry event bus integration test (#39830)

This commit is contained in:
Charlie Kolb 2026-09-29 08:04:44 +00:00 committed by GitHub
parent 0cd66905e5
commit 3220953fb4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -336,16 +336,10 @@ test('should send message to sentry ', async () => {
sentryDestination.enabled = true;
const mockedSentryCaptureMessage = vi.spyOn(sentryDestination.sentryClient!, 'captureMessage');
mockedSentryCaptureMessage.mockImplementation((_m, _level, _hint, _scope) => {
eventBus.confirmMessageDelivered(testMessage, {
id: sentryDestination.id,
name: sentryDestination.label,
});
return testMessage.id;
});
mockedSentryCaptureMessage.mockReturnValue(testMessage.id);
await eventBus.send(testMessage);
await onFirstWorkerMessage('confirmMessageSent', async () => {
await vi.waitFor(async () => {
await confirmIdInAll(testMessage.id);
await confirmIdSent(testMessage.id);
expect(mockedSentryCaptureMessage).toHaveBeenCalled();