Skip to content

Conversation

rjernst
Copy link
Member

@rjernst rjernst commented Aug 6, 2020

The ReloadSecureSettingsIT uses latches to ensure coordination across
requests to the underlying in memory cluster. However, in the case of an
expected failure, if the assertion fails, the latch will never be
counted down, and will cause the test to hang indefinitely. This commit
ensures the latch is always counted down with a try/finally.

relates #51546

The ReloadSecureSettingsIT uses latches to ensure coordination across
requests to the underlying in memory cluster. However, in the case of an
expected failure, if the assertion fails, the latch will never be
counted down, and will cause the test to hang indefinitely. This commit
ensures the latch is always counted down with a try/finally.

relates elastic#51546
@rjernst rjernst added >test Issues or PRs that are addressing/adding tests :Core/Infra/Settings Settings infrastructure and APIs v8.0.0 v7.10.0 labels Aug 6, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Settings)

@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Aug 6, 2020
rjernst added a commit to rjernst/elasticsearch that referenced this pull request Aug 6, 2020
The ReloadSecureSettingsIT makes requests to the reload settings apis.
In 7.x, the client used from the integ test infrastructure may be a
transport client. In that case, the expected exception type, and causes
the test to fail (though it will hang indefinitely due to not counting
down the latch, see
elastic#60800). This commit adds
unwrapping of the remote exception to get the underlying expected
exception.

closes elastic#51546
@rjernst rjernst requested a review from jaymode August 6, 2020 04:13
@rjernst rjernst merged commit 42460a1 into elastic:master Aug 6, 2020
@rjernst rjernst deleted the fix/51546_latch_exception branch August 6, 2020 22:33
rjernst added a commit that referenced this pull request Aug 6, 2020
The ReloadSecureSettingsIT uses latches to ensure coordination across
requests to the underlying in memory cluster. However, in the case of an
expected failure, if the assertion fails, the latch will never be
counted down, and will cause the test to hang indefinitely. This commit
ensures the latch is always counted down with a try/finally.

relates #51546
rjernst added a commit that referenced this pull request Aug 13, 2020
The ReloadSecureSettingsIT makes requests to the reload settings apis.
In 7.x, the client used from the integ test infrastructure may be a
transport client. In that case, the expected exception type, and causes
the test to fail (though it will hang indefinitely due to not counting
down the latch, see
#60800). This commit adds
unwrapping of the remote exception to get the underlying expected
exception.

closes #51546
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Core/Infra/Settings Settings infrastructure and APIs Team:Core/Infra Meta label for core/infra team >test Issues or PRs that are addressing/adding tests v7.10.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants