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 10 months 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