Fix flaky testDisableErrorLogByDefault#2869
Merged
Merged
Conversation
junkaixue
reviewed
Aug 2, 2024
| @@ -555,9 +564,10 @@ void publishStatusUpdateRecord(ZNRecord record, Message message, Level level, | |||
| */ | |||
| void publishErrorRecord(ZNRecord record, String instanceName, String updateSubPath, | |||
Contributor
There was a problem hiding this comment.
Instead of using this approach to define param, let's do this:
create a new function:
void publishErrorRecord(ZNRecord record, String instanceName, String updateSubPath,String updateKey, String sessionId, HelixDataAccessor accessor, boolean isController, boolean logToZK);
Put all existing logic in this one and leverage this boolean flag to check.
For the old API, you can call this by passing
ERROR_LOG_TO_ZK_ENABLED
Contributor
Author
|
Pull request approved @junkaixue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issues
#2818
testDisableErrorLogByDefault in TestStatusUpdateUtil failing intermittently
Description
There are 2 things at play here:
I'm not sure this specific approach of having a static method to reassign the static variable is the best practice. Maybe it is better to modify StatusUpdateUtil so that it has a local variable taht can be set by its constructor, or that defaults to the system property value if no value provided.
Tests
testDisableErrorLogByDefault
(If CI test fails due to known issue, please specify the issue and test PR locally. Then copy & paste the result of "mvn test" to here.)
Commits
Code Quality
(helix-style-intellij.xml if IntelliJ IDE is used)