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

refactor(batch): easier for writing tests with customized exchange source #3236

Merged
merged 1 commit into from
Jun 15, 2022

Conversation

lmatz
Copy link
Contributor

@lmatz lmatz commented Jun 15, 2022

What's changed and what's your intention?

Use a concrete struct to create a source instead of merely generics.

For each concrete source, we have a dedicated concrete source creator struct to initialize. This is helpful when we want to ingest different data into different sources during tests.

Checklist

- [ ] I have written necessary docs and comments
- [ ] I have added necessary unit tests and integration tests

  • All checks passed in ./risedev check (or alias, ./risedev c)

Refer to a related PR or issue link (optional)

closes #1645

@codecov
Copy link

codecov bot commented Jun 15, 2022

Codecov Report

Merging #3236 (b1e308d) into main (47fb009) will decrease coverage by 0.01%.
The diff coverage is 88.00%.

@@            Coverage Diff             @@
##             main    #3236      +/-   ##
==========================================
- Coverage   73.41%   73.40%   -0.02%     
==========================================
  Files         744      744              
  Lines      101665   101644      -21     
==========================================
- Hits        74634    74608      -26     
- Misses      27031    27036       +5     
Flag Coverage Δ
rust 73.40% <88.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/batch/src/executor/generic_exchange.rs 47.57% <77.77%> (-11.96%) ⬇️
src/batch/src/executor/merge_sort_exchange.rs 67.62% <80.00%> (-4.71%) ⬇️
src/batch/src/executor/test_utils.rs 94.94% <100.00%> (+1.44%) ⬆️
src/meta/src/hummock/mock_hummock_meta_client.rs 42.85% <0.00%> (-1.10%) ⬇️
src/storage/src/hummock/local_version_manager.rs 83.86% <0.00%> (-0.16%) ⬇️
src/meta/src/barrier/mod.rs 69.45% <0.00%> (+0.32%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@lmatz lmatz requested a review from liurenjie1024 June 15, 2022 07:04
Copy link
Member

@xxchan xxchan left a comment

Choose a reason for hiding this comment

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

LGTM

@lmatz lmatz merged commit 2ad3a5b into main Jun 15, 2022
@lmatz lmatz deleted the lz/source branch June 15, 2022 07:38
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.

duplicated FakeCreateSource and FakeExchangeSource
2 participants