Skip to content
Merged
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,11 @@ export default function({ getService }) {
'ilm', // data enricher
'isRollupIndex', // data enricher
];
expect(Object.keys(body[0])).to.eql(expectedKeys);
// We need to sort the keys before comparing then, because race conditions
// can cause enrichers to register in non-deterministic order.
const sortedExpectedKeys = expectedKeys.sort();
const sortedReceivedKeys = Object.keys(body[0]).sort();
expect(sortedReceivedKeys).to.eql(sortedExpectedKeys);
});
});

Expand All @@ -224,7 +228,11 @@ export default function({ getService }) {
'ilm', // data enricher
'isRollupIndex', // data enricher
];
expect(Object.keys(body[0])).to.eql(expectedKeys);
// We need to sort the keys before comparing then, because race conditions
// can cause enrichers to register in non-deterministic order.
const sortedExpectedKeys = expectedKeys.sort();
const sortedReceivedKeys = Object.keys(body[0]).sort();
expect(sortedReceivedKeys).to.eql(sortedExpectedKeys);
expect(body.length > 1).to.be(true); // to contrast it with the next test
});
});
Expand Down