balancergroup: merge whitebox tests into blackbox test#9094
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9094 +/- ##
==========================================
- Coverage 83.08% 83.02% -0.07%
==========================================
Files 413 413
Lines 33484 33484
==========================================
- Hits 27821 27799 -22
- Misses 4240 4250 +10
- Partials 1423 1435 +12 🚀 New features to boost your workflow:
|
|
Hi @hugehoo, Thanks for raising the PR. Instead of creating a new file and copy the content, can you please use |
698d06e to
42d8fab
Compare
|
If you are simply moving the tests from one file to another and changing the package name, why is the diff still so huge? I'm not entirely convinced whether the |
|
@easwars the git mv is meaningless in this case because
No matter how I re-structure the commits, the "Files changed" will show the same large diff, i guess. Although It would still get a large diff, I could reset current commits and restructure 3 small commits to make it easier to review. |
|
@hugehoo : Sorry, I didnt realize that the file existed already. But feel free to create a new file, so that the diff only ends up showing the lines that are actually changed. |
Convert balancergroup_test.go in-place from whitebox (package balancergroup) to blackbox (package balancergroup_test) testing. This minimizes the PR diff by keeping the same filename and only changing the lines that need to differ for external package access. Changes: - package balancergroup → package balancergroup_test - Add imports: "strings", "google.golang.org/grpc/internal/balancergroup" - Qualify types: New → balancergroup.New, Options → balancergroup.Options, BalancerGroup → balancergroup.BalancerGroup, ParseConfig → balancergroup.ParseConfig - defaultTestShortTimeout: 10ms → 100ms (avoid flakes) - Move TestBalancerGroup_RemoveImmediately from ext_test into main test file - Delete balancergroup_ext_test.go (no longer needed)
42d8fab to
88ac5b6
Compare
fixes #8996
internal/balancergrouppackagesbalancergroup/balancergroup_test.go) into black box test (balancergroup/balancergroup_ext_test.go) to ensure to test the API, not the internal symbols.balancergroup_test.gotobalancergroup_ext_test.goRELEASE NOTES: N/A