mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdserver: refactor a for loop in recvSnap test
This commit is contained in:
parent
67ffeee521
commit
0708a5e50d
@ -851,10 +851,7 @@ func TestRecvSnapshot(t *testing.T) {
|
|||||||
n.readyc <- raft.Ready{Snapshot: raftpb.Snapshot{Metadata: raftpb.SnapshotMetadata{Index: 1}}}
|
n.readyc <- raft.Ready{Snapshot: raftpb.Snapshot{Metadata: raftpb.SnapshotMetadata{Index: 1}}}
|
||||||
|
|
||||||
// wait for actions happened on the storage
|
// wait for actions happened on the storage
|
||||||
for {
|
for len(p.Action()) == 0 {
|
||||||
if len(p.Action()) != 0 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
time.Sleep(10 * time.Millisecond)
|
time.Sleep(10 * time.Millisecond)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user