mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
wal: Fix format error avoid using reflect.DeepEqual with errors (#12118)
This commit is contained in:
parent
e9d16c2b62
commit
772dfbfe35
@ -16,6 +16,7 @@ package wal
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"hash/crc32"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
@ -57,7 +58,7 @@ func TestReadRecord(t *testing.T) {
|
||||
if !reflect.DeepEqual(rec, tt.wr) {
|
||||
t.Errorf("#%d: block = %v, want %v", i, rec, tt.wr)
|
||||
}
|
||||
if !reflect.DeepEqual(e, tt.we) {
|
||||
if !errors.Is(e, tt.we) {
|
||||
t.Errorf("#%d: err = %v, want %v", i, e, tt.we)
|
||||
}
|
||||
rec = &walpb.Record{}
|
||||
|
Loading…
x
Reference in New Issue
Block a user