Skip to content

Conversation

@DaveCTurner
Copy link
Contributor

Relates #55550

@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label Feb 18, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (Team:Core/Features)

}

@Nullable // unless running tests that inject extra behaviour
private volatile Runnable onShardOperation;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is totally stupid, but I just can't see a better way to block these operations for the purposes of this test.

Copy link
Contributor

@original-brownbear original-brownbear left a comment

Choose a reason for hiding this comment

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

LGTM

/**
* Helper method for tests to call {@link TransportRecoveryAction#setOnShardOperation}.
*/
public static void setOnShardOperation(TransportRecoveryAction transportRecoveryAction, Runnable setOnShardOperation) {
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: Maybe just inline this into the test class that actually uses it? Why have a separate method for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I put it here so I could keep TransportRecoveryAction#setOnShardOperation package-private (without needing the test itself to be in the same package as the action)

Copy link
Contributor

Choose a reason for hiding this comment

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

ah ok, makes sense :)

@DaveCTurner DaveCTurner merged commit 61e6734 into elastic:master Feb 25, 2021
@DaveCTurner DaveCTurner deleted the 2021-02-18-recovery-stats-cancellable branch February 25, 2021 09:24
DaveCTurner added a commit that referenced this pull request Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Data Management/Stats Statistics tracking and retrieval APIs >enhancement Team:Data Management Meta label for data/management team v7.13.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants