Skip to content

Commit ee2834f

Browse files
committed
[Maps] Fix flaky test in maps geo file – remove exact assertion on approximate document count (elastic#241426)
Resolves elastic#234490 The link to Flaky Test Runner: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/9709 ### Summary This PR fixes a flaky test in the maps geo file upload suite. The test was asserting an exact document count (Found ~281 documents), but due to MVT tile rendering, the number of documents may vary slightly depending on the zoom level. ### Details In some runs, the count fluctuated between ~280 and ~281, causing the test to fail intermittently. ### Reasoning The failing test screenshot showed a slightly different zoom level compared to the local FTR environment. To stabilize the test, I explicitly set the zoom level at the beginning of the test to ensure consistent MVT data loading. (cherry picked from commit 7943c3e)
1 parent af4eab3 commit ee2834f

File tree

1 file changed

+1
-0
lines changed
  • x-pack/platform/test/functional/apps/maps/group4/file_upload

1 file changed

+1
-0
lines changed

x-pack/platform/test/functional/apps/maps/group4/file_upload/geojson.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export default function ({ getPageObjects, getService }) {
5454
});
5555

5656
it('should add as document layer', async () => {
57+
await maps.setView(0, 0, 1); // set stable viewport to prevent flakiness caused by MVT tiles loading different data at varying zoom levels
5758
await geoFileUpload.addFileAsDocumentLayer();
5859
await maps.waitForLayersToLoad();
5960

0 commit comments

Comments
 (0)