Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fkellner
Copy link
Contributor

@fkellner fkellner commented Apr 8, 2024

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?

  • 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?

  • No

Other useful information

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. This is now fixed.

On Behalf of DB Systel
@tdipisa
Copy link
Member

tdipisa commented Apr 8, 2024

@fkellner Thank you so much for your contribution

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Search Epic Test with two services is flaky
2 participants