MapStore2 icon indicating copy to clipboard operation
MapStore2 copied to clipboard

geosolutions-it#10175: fix 2 services search test nondeterminism

Open fkellner opened this issue 1 year ago • 1 comments

Description

Apparently, which search service observable emits results first does not depend on the order in which they are passed into the search. The test however assumed there to be an order, causing it to break on MacOS.

New version:

  • sets a different priority for the services
  • accepts results from either file in the first emitted result action
  • only accepts results from the file with higher priority in the second result action

Relevant source lines in the search epic:

// merge all results from the streams
.mergeAll()
.scan((oldRes, newRes) => sortBy([...oldRes, ...newRes], ["__PRIORITY__"]))

What kind of change does this PR introduce?

  • [x] Bugfix

Issue

What is the current behavior?

#10175

What is the new behavior?

Tests run through regardless of OS.

Breaking change

Does this PR introduce a breaking change?

  • [x] No

Other useful information

fkellner avatar Apr 08 '24 10:04 fkellner

@fkellner Thank you so much for your contribution

@MV88, let's evaluate a possible inclusion in 2024.01.01 (waiting for the review).

tdipisa avatar Apr 08 '24 11:04 tdipisa

@fkellner Thank you so much for your contribution

@MV88, let's evaluate a possible inclusion in 2024.01.01 (waiting for the review).

@tdipisa it's an improvement for a test, i think it is safe to include it in the next release 2024.02.00

@fkellner thanks for spotting this and for your contribution

MV88 avatar Aug 29 '24 13:08 MV88

@ElenaGallo no specific functional tests are needed for this now. The usual functional test run scheduled for QA for 2024.02.00 is more than enough.

MV88 avatar Aug 29 '24 16:08 MV88