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

feat: raft/log_unstable_test use testify packages in tests #14795

Merged
merged 1 commit into from
Nov 21, 2022

Conversation

falser101
Copy link
Contributor

@falser101 falser101 commented Nov 17, 2022

Signed-off-by: jianfei.zhang [email protected]
Fixed #14709

@falser101 falser101 changed the title feat: raft/log_unstable_test se testify packages in tests feat: raft/log_unstable_test use testify packages in tests Nov 17, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #14795 (78808d4) into main (719a0a4) will decrease coverage by 0.28%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main   #14795      +/-   ##
==========================================
- Coverage   75.79%   75.50%   -0.29%     
==========================================
  Files         457      457              
  Lines       37377    37341      -36     
==========================================
- Hits        28329    28196     -133     
- Misses       7288     7372      +84     
- Partials     1760     1773      +13     
Flag Coverage Δ
all 75.50% <ø> (-0.29%) ⬇️

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

Impacted Files Coverage Δ
server/proxy/grpcproxy/auth.go 44.44% <0.00%> (-44.45%) ⬇️
server/proxy/grpcproxy/maintenance.go 45.45% <0.00%> (-36.37%) ⬇️
etcdutl/etcdutl/printer.go 16.66% <0.00%> (-9.05%) ⬇️
server/storage/mvcc/watchable_store.go 84.42% <0.00%> (-8.34%) ⬇️
client/pkg/v3/testutil/leak.go 60.17% <0.00%> (-7.08%) ⬇️
client/v3/namespace/watch.go 87.87% <0.00%> (-6.07%) ⬇️
client/v3/concurrency/session.go 88.63% <0.00%> (-4.55%) ⬇️
client/v3/leasing/cache.go 87.77% <0.00%> (-3.89%) ⬇️
server/etcdserver/api/v3rpc/watch.go 84.76% <0.00%> (-3.50%) ⬇️
server/etcdserver/api/v3rpc/util.go 77.41% <0.00%> (-3.23%) ⬇️
... and 17 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@falser101
Copy link
Contributor Author

@ahrtr @fuweid help review! thanks!

Copy link
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM (non-binding)

ptabor
ptabor previously requested changes Nov 17, 2022
raft/log_unstable_test.go Show resolved Hide resolved
@ahrtr
Copy link
Member

ahrtr commented Nov 18, 2022

@falser101 The linearzability failure is resolved in another PR, so please rebase this PR.

@falser101
Copy link
Contributor Author

falser101 commented Nov 18, 2022

@falser101 The linearzability failure is resolved in another PR, so please rebase this PR.

rebased!

Copy link
Member

@ahrtr ahrtr left a comment

Choose a reason for hiding this comment

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

LGTM

Thank you @falser101

@falser101
Copy link
Contributor Author

@ptabor please help review,thanks

@ahrtr
Copy link
Member

ahrtr commented Nov 21, 2022

cc @tbg

t.Errorf("snap = %v, want %v", u.snapshot, &s)
}
require.Equal(t, s.Metadata.Index+1, u.offset)
require.Zero(t, len(u.entries))
Copy link
Contributor

Choose a reason for hiding this comment

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

for next time: require.Zero(t, u.entries) is better because it will print the slice if it's not empty.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok!

@tbg tbg merged commit d4316f3 into etcd-io:main Nov 21, 2022
@falser101 falser101 deleted the fix/log_unstable branch November 22, 2022 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

raft: use testify package in unit tests
6 participants