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

Add unsetCurrentContext to ContextPropagator interface #898

Merged
merged 3 commits into from
May 16, 2024

Conversation

shijiesheng
Copy link
Contributor

What changed?

  • added unsetCurrentContext method to ContextPropagator

Why?

Existing ContextPropagator interface do not support context deactivation

How did you test it?

unit test

Potential risks

Release notes

Documentation Changes


@Override
public void unsetCurrentContext() {
MDC.remove("test");
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 add an assertion that this key is removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure. There is actually no easy way to assert on MDC directly, so I added a counter to ensure state is cleaned.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 2333

Details

  • 13 of 13 (100.0%) changed or added relevant lines in 4 files are covered.
  • 5 unchanged lines in 4 files lost coverage.
  • Overall coverage increased (+0.05%) to 61.48%

Files with Coverage Reduction New Missed Lines %
src/main/java/com/uber/cadence/internal/testservice/TestWorkflowMutableStateImpl.java 1 83.61%
src/main/java/com/uber/cadence/internal/replay/ReplayDecisionTaskHandler.java 1 87.8%
src/main/java/com/uber/cadence/internal/worker/BlockCallerPolicy.java 1 62.5%
src/main/java/com/uber/cadence/internal/worker/LocallyDispatchedActivityPollTask.java 2 39.02%
Totals Coverage Status
Change from base Build 2331: 0.05%
Covered Lines: 11975
Relevant Lines: 19478

💛 - Coveralls

@abhishekj720 abhishekj720 merged commit 95cb139 into uber:master May 16, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants