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

Introduce SettableWatcher to make writing Watcher related integration… #693

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

imasahiro
Copy link
Member

… test more easily

@codecov
Copy link

codecov bot commented May 23, 2022

Codecov Report

Merging #693 (7490497) into master (8a32763) will decrease coverage by 0.13%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##             master     #693      +/-   ##
============================================
- Coverage     70.19%   70.06%   -0.14%     
+ Complexity     3419     3414       -5     
============================================
  Files           349      350       +1     
  Lines         13468    13487      +19     
  Branches       1454     1457       +3     
============================================
- Hits           9454     9449       -5     
- Misses         3133     3154      +21     
- Partials        881      884       +3     
Impacted Files Coverage Δ
...linecorp/centraldogma/testing/SettableWatcher.java 0.00% <0.00%> (ø)
...erver/internal/storage/PurgeSchedulingService.java 70.11% <0.00%> (-6.90%) ⬇️
...ient/armeria/legacy/LegacyCentralDogmaBuilder.java 81.48% <0.00%> (-3.71%) ⬇️
...internal/storage/DirectoryBasedStorageManager.java 63.31% <0.00%> (-0.88%) ⬇️
...internal/replication/ZooKeeperCommandExecutor.java 78.41% <0.00%> (+0.36%) ⬆️
...centraldogma/server/internal/api/WatchService.java 79.66% <0.00%> (+3.38%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8a32763...7490497. Read the comment docs.

import com.linecorp.centraldogma.client.Watcher;
import com.linecorp.centraldogma.common.Revision;

public final class SettableWatcher<T> implements Watcher<T> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would you mind adding Javadoc and simple test suites to ensure the feature?

updateListeners.clear();
}

public void setValue(T value) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a Javadoc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants