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

integration: add more lease tests #6117

Merged
merged 1 commit into from
Aug 6, 2016
Merged

integration: add more lease tests #6117

merged 1 commit into from
Aug 6, 2016

Conversation

gyuho
Copy link
Contributor

@gyuho gyuho commented Aug 6, 2016

Fix #6102.

@xiang90
Copy link
Contributor

xiang90 commented Aug 6, 2016

Can you try to run these test before commit #6098?

kvc := toGRPC(clus.Client(0)).KV
lsc := toGRPC(clus.Client(0)).Lease

lresp, err := lsc.LeaseGrant(context.TODO(), &pb.LeaseGrantRequest{TTL: 5 * 60})
Copy link
Contributor

Choose a reason for hiding this comment

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

define the 5 * 60 thing as a 5minTTL as a global var in this test file?

@xiang90
Copy link
Contributor

xiang90 commented Aug 6, 2016

LGTM

@gyuho
Copy link
Contributor Author

gyuho commented Aug 6, 2016

@xiang90 Without your Fix Lease PR, it fails:

go test -v -run TestV3LeaseRecoverKeyWithDetachedLease
=== RUN   TestV3LeaseRecoverKeyWithDetachedLease
--- FAIL: TestV3LeaseRecoverKeyWithDetachedLease (0.16s)
    v3_lease_test.go:530: only detached lease removed, key should remain
FAIL
exit status 1
FAIL    github.com/coreos/etcd/integration  0.169s
gyuho@gyuho: ~/go/src/github.com/coreos/etcd/integration $
go test -v -run TestV3LeaseRecoverKeyWithMutipleLease
=== RUN   TestV3LeaseRecoverKeyWithMutipleLease
--- FAIL: TestV3LeaseRecoverKeyWithMutipleLease (0.16s)
    v3_lease_test.go:589: only detached lease removed, key should remain

And we need to create a new client after restart because gRPC fails fast (we don't pass FailFast(false) in integration test). I added comments on this.

Will merge after greens, if there's no objection.

Thanks!

@gyuho gyuho merged commit f505bcb into etcd-io:master Aug 6, 2016
@gyuho gyuho deleted the lease-test branch August 6, 2016 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants