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

etcdserver: fix TestSnap #5885

Merged
merged 1 commit into from
Jul 6, 2016
Merged

etcdserver: fix TestSnap #5885

merged 1 commit into from
Jul 6, 2016

Conversation

xiang90
Copy link
Contributor

@xiang90 xiang90 commented Jul 6, 2016

Fix #5797.

We introduce the kv.commit call in the snapshot path, which slows down the go routine. Using wait to reliably wait for the actual snap event to happen.

@gyuho
Copy link
Contributor

gyuho commented Jul 6, 2016

lgtm.

sorry, closed by clicking the wrong button.

@gyuho gyuho closed this Jul 6, 2016
@gyuho gyuho reopened this Jul 6, 2016
@@ -869,7 +869,7 @@ func TestSnapshot(t *testing.T) {
if !reflect.DeepEqual(gaction[1], testutil.Action{Name: "SaveNoCopy"}) {
t.Errorf("action = %s, want SaveNoCopy", gaction[1])
}
gaction = p.Action()
gaction, _ = p.Wait(1)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is still racey. p would need to be NewStorageRecorderStream for this to be reliable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i will change.

@xiang90
Copy link
Contributor Author

xiang90 commented Jul 6, 2016

@heyitsanthony fixed.

@xiang90 xiang90 merged commit 4db8f01 into etcd-io:master Jul 6, 2016
@xiang90 xiang90 deleted the fix_snap_test branch July 6, 2016 18:21
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.

None yet

3 participants