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

[Rollup] improve stopping tests #55666

Merged
merged 1 commit into from
Apr 24, 2020

Conversation

hendrikmuhs
Copy link

improve tests related to stopping using a client that answers and can be
synchronized with the test thread in order to test special situations

relates #55011

Note

This is a spin off from #55011, which uncovered a weakness of the test: By using a mock client, any request got ignored. This change adds a client that actually answers. As the tests are about state machine testing with 2 parallel threads and unknown timing, it was necessary to synchronize the execution to test certain behavior (stop when state is stopping, start when state is stopping).

The change is necessary because with #55011 the state of the indexer thread is checked in more places. It should fix issues like this.

Sorry, for the noisy PR, the indentation changes are mostly due to using a proper client.

/CC @jimczi

synchronized with the test thread in order to test special situations
@hendrikmuhs hendrikmuhs added >test Issues or PRs that are addressing/adding tests :StorageEngine/Rollup Turn fine-grained time-based data into coarser-grained data v8.0.0 v7.8.0 labels Apr 23, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-analytics-geo (:Analytics/Rollup)

Copy link
Contributor

@jimczi jimczi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hendrikmuhs hendrikmuhs merged commit dca44f6 into elastic:master Apr 24, 2020
@hendrikmuhs hendrikmuhs deleted the rollup-stopping-tests branch April 24, 2020 06:46
hendrikmuhs pushed a commit that referenced this pull request Apr 24, 2020
improve tests related to stopping using a client that answers and can be
synchronized with the test thread in order to test special situations

relates #55011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:StorageEngine/Rollup Turn fine-grained time-based data into coarser-grained data >test Issues or PRs that are addressing/adding tests v7.8.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants