tests: fix some typos in comments

Signed-off-by: coderwander <770732124@qq.com>
This commit is contained in:
coderwander 2024-04-16 11:47:24 +08:00
parent 0cd5999b78
commit 842a0f3a35
3 changed files with 4 additions and 4 deletions

View File

@ -47,7 +47,7 @@ func TestKVPut(t *testing.T) {
t.Fatalf("count not get key %q, err: %s", key, err)
}
if len(resp.Kvs) != 1 {
t.Errorf("Unexpected lenth of response, got %d", len(resp.Kvs))
t.Errorf("Unexpected length of response, got %d", len(resp.Kvs))
}
if string(resp.Kvs[0].Key) != key {
t.Errorf("Unexpected key, want %q, got %q", key, resp.Kvs[0].Key)
@ -234,7 +234,7 @@ func TestKVGetNoQuorum(t *testing.T) {
_, err := cc.Get(ctx, key, tc.options)
gotError := err != nil
if gotError != tc.wantError {
t.Fatalf("Unexpeted result, wantError: %v, gotErr: %v, err: %s", tc.wantError, gotError, err)
t.Fatalf("Unexpected result, wantError: %v, gotErr: %v, err: %s", tc.wantError, gotError, err)
}
})
})

View File

@ -88,7 +88,7 @@ func TestDetectKvOrderViolation(t *testing.T) {
t.Logf("Quering m2 after restart")
v, err = orderingKv.Get(ctx, "foo", clientv3.WithSerializable())
t.Logf("Quering m2 returned: v:%v erro:%v ", v, err)
t.Logf("Quering m2 returned: v:%v err:%v ", v, err)
if err != errOrderViolation {
t.Fatalf("expected %v, got err:%v v:%v", errOrderViolation, err, v)
}

View File

@ -171,7 +171,7 @@ func TestV3WatchFromCurrentRevision(t *testing.T) {
},
},
{
"multiple puts, one watcher with matching perfix",
"multiple puts, one watcher with matching prefix",
[]string{"foo", "foo", "foo"},
&pb.WatchRequest{RequestUnion: &pb.WatchRequest_CreateRequest{
CreateRequest: &pb.WatchCreateRequest{