fix(event-bridge): restore overseas event delivery
This commit is contained in:
+16
@@ -65,6 +65,22 @@ class EventInboxServiceTest {
|
||||
assertThat(receiveCount("DUPLICATE")).isEqualTo(1.0);
|
||||
}
|
||||
|
||||
@Test
|
||||
void 数据库毫秒精度截断后相同事件仍判定为重复() {
|
||||
EventEnvelope source = envelope("sha256:placeholder");
|
||||
EventEnvelope precise = new EventEnvelope(source.eventId(), source.eventType(), source.eventVersion(),
|
||||
Instant.parse("2026-07-29T08:30:00.123456789Z"), source.sourceRegion(), source.targetRegion(),
|
||||
source.tenantId(), source.aggregateType(), source.aggregateId(), source.aggregateVersion(),
|
||||
source.handoverVersion(), source.traceId(), source.correlationId(), source.causationId(),
|
||||
source.payload(), source.payloadHash());
|
||||
EventEnvelope envelope = withHash(precise);
|
||||
BridgeInbox existing = existing(envelope, envelope.payloadHash());
|
||||
existing.setOccurredAt(Instant.parse("2026-07-29T08:30:00.123Z"));
|
||||
when(store.findByEventId(envelope.eventId())).thenReturn(existing);
|
||||
|
||||
assertThat(service.receive(envelope).result()).isEqualTo("重复");
|
||||
}
|
||||
|
||||
@Test
|
||||
void 相同事件但摘要不同时拒绝覆盖() {
|
||||
EventEnvelope envelope = withHash(envelope("sha256:placeholder"));
|
||||
|
||||
Reference in New Issue
Block a user