Skip to content

Commit

Permalink
Adding timestamps to created events so the sorting is stable (#84515)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-buttner committed Nov 30, 2020
1 parent 8e1fe69 commit 3d8281f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,15 @@ export default function resolverAPIIntegrationTests({ getService }: FtrProviderC
});

startEvent = generator.generateEvent({
timestamp: (timestampSafeVersion(infoEvent) ?? 0) + 100,
parentEntityID: entityIDSafeVersion(infoEvent),
ancestry: createAncestryArray([infoEvent, origin]),
eventType: ['start'],
eventsDataStream: EndpointDocGenerator.createDataStreamFromIndex(processEventsIndex),
});

execEvent = generator.generateEvent({
timestamp: (timestampSafeVersion(startEvent) ?? 0) + 100,
parentEntityID: entityIDSafeVersion(startEvent),
ancestry: createAncestryArray([startEvent, infoEvent]),
eventType: ['change'],
Expand Down Expand Up @@ -107,6 +109,7 @@ export default function resolverAPIIntegrationTests({ getService }: FtrProviderC
});

infoEvent = generator.generateEvent({
timestamp: (timestampSafeVersion(startEvent) ?? 0) + 100,
parentEntityID: entityIDSafeVersion(origin),
ancestry: createAncestryArray([origin]),
entityID: entityIDSafeVersion(startEvent),
Expand All @@ -115,6 +118,7 @@ export default function resolverAPIIntegrationTests({ getService }: FtrProviderC
});

execEvent = generator.generateEvent({
timestamp: (timestampSafeVersion(infoEvent) ?? 0) + 100,
parentEntityID: entityIDSafeVersion(origin),
ancestry: createAncestryArray([origin]),
eventType: ['change'],
Expand Down

0 comments on commit 3d8281f

Please sign in to comment.