One of the test scenarios for as-ingested-coordinates
expects that the natural ordering of the Elasticsearch response remains consistent, even when an explicit order is not provided.
It assumes that records will appear in the response sorted by ID:
"id": "osdu:virtual-properties-Integration:testIngest1"
...
"id": "osdu:virtual-properties-Integration:testIngest2"
...
"id": "osdu:virtual-properties-Integration:testIngest3"
We've noticed that in one environment, the ordering has changed and now appears as follows:
"id": "osdu:virtual-properties-Integration:testIngest2"
...
"id": "osdu:virtual-properties-Integration:testIngest1"
...
"id": "osdu:virtual-properties-Integration:testIngest3"
Tests fail because they pick only the first record from the Elasticsearch response and expect to find a property that is only present in the record with ID osdu:virtual-properties-Integration:testIngest1
To ensure tests work consistently across environments, we've explicitly added ordering while keeping changes minimal.
Locally and in the pipeline.
Any comments to approvers here