Skip to content

Attempt to fix o.o.transport.netty4.OpenSearchLoggingHandlerIT fails w/ stack overflow by hardening test expectation patterns#1900

Merged
nknize merged 1 commit intoopensearch-project:mainfrom
reta:issue-1767
Jan 14, 2022
Merged

Attempt to fix o.o.transport.netty4.OpenSearchLoggingHandlerIT fails w/ stack overflow by hardening test expectation patterns#1900
nknize merged 1 commit intoopensearch-project:mainfrom
reta:issue-1767

Conversation

@reta
Copy link
Copy Markdown
Contributor

@reta reta commented Jan 13, 2022

Signed-off-by: Andriy Redko andriy.redko@aiven.io

Description

Attempt to fix o.o.transport.netty4.OpenSearchLoggingHandlerIT fails w/ stack overflow by hardening test expectation patterns. I was not able to reproduce the issue locally but suspects are: Log4j (specific message) and our own MockLogAppender.LoggingExpectation. At least, if the issue continues to manifest, we should be able to exclude MockLogAppender.LoggingExpectation from suspects.

Issues Resolved

Possibly closes #1767

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…w/ stack overflow by hardening test expectation patterns

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
@reta reta requested a review from a team as a code owner January 13, 2022 19:52
final String writePattern = "^.*\\[length: \\d+"
+ ", request id: \\d+"
+ ", type: request"
+ ", version: .*"
Copy link
Copy Markdown
Contributor Author

@reta reta Jan 13, 2022

Choose a reason for hiding this comment

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

Making regexes more strict and constrained.

@opensearch-ci-bot
Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@opensearch-ci-bot
Copy link
Copy Markdown
Collaborator

✅   Gradle Check success 59a8fb8
Log 1910

Reports 1910

@nknize nknize self-requested a review January 14, 2022 05:08
@nknize nknize added :test Adding or fixing a test v2.0.0 Version 2.0.0 labels Jan 14, 2022
Copy link
Copy Markdown
Contributor

@nknize nknize left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for digging into this stackOverflow. It's an elusive one and hard to repro.

@nknize nknize merged commit 6dcfe8c into opensearch-project:main Jan 14, 2022
@reta
Copy link
Copy Markdown
Contributor Author

reta commented Jan 14, 2022

Thanks @nknize , I will keep an eye on it, in case it pops up again, really nasty one

reta added a commit to reta/OpenSearch that referenced this pull request Jan 14, 2022
…st failure (opensearch-project#1900)

Attempt to fix o.o.transport.netty4.OpenSearchLoggingHandlerIT fails w/ stack overflow by
hardening test expectation patterns in regex patterns

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
nknize pushed a commit that referenced this pull request Jan 14, 2022
…st failure (#1900) (#1906)

Attempt to fix o.o.transport.netty4.OpenSearchLoggingHandlerIT fails w/ stack overflow by
hardening test expectation patterns in regex patterns

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:test Adding or fixing a test v2.0.0 Version 2.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] o.o.transport.netty4.OpenSearchLoggingHandlerIT fails w/ stack overflow

3 participants