1
0
mirror of https://github.com/etcd-io/etcd.git synced 2026-02-05 06:46:49 +01:00

chore: fix some typos in comment

Signed-off-by: yajianggroup <yajianggroup@outlook.com>
This commit is contained in:
yajianggroup
2025-09-28 16:00:23 +08:00
parent b868ea1043
commit ab7ba34005
8 changed files with 8 additions and 8 deletions

View File

@@ -112,7 +112,7 @@ func RegisterLeakDetection(t TB) {
// It will detect common goroutine leaks, retrying in case there are goroutines
// not synchronously torn down, and fail the test if any goroutines are stuck.
func afterTest(t TB) {
// If test-failed the leaked goroutines list is hidding the real
// If the test fails, the leaked goroutines list may hide the real
// source of problem.
if !t.Failed() {
if err := CheckAfterTest(1 * time.Second); err != nil {

View File

@@ -353,7 +353,7 @@ func TestNewWithOnlyJWT(t *testing.T) {
}
if tok, ok := meta[rpctypes.TokenFieldNameGRPC]; !ok {
t.Error("Token was not successfuly set in the auth bundle")
t.Error("Token was not successfully set in the auth bundle")
} else if tok != "foo" {
t.Errorf("Incorrect token set in auth bundle, got '%s', expected 'foo'", tok)
}

View File

@@ -896,7 +896,7 @@ func (w *watchGRPCStream) newWatchClient() (pb.Watch_WatchClient, error) {
w.resuming = resuming
w.substreams = make(map[int64]*watcherStream)
// connect to grpc stream while accepting watcher cancelation
// connect to grpc stream while accepting watcher cancellation
stopc := make(chan struct{})
donec := w.waitCancelSubstreams(stopc)
wc, err := w.openWatchClient()

View File

@@ -198,7 +198,7 @@ func (ep *ExpectProcess) ExpectFunc(ctx context.Context, f func(string) bool) (s
}
select {
// NOTE: we wait readCloseCh for ep.read() to complete draining the log before acquring the lock.
// NOTE: we wait readCloseCh for ep.read() to complete draining the log before acquiring the lock.
case <-ep.readCloseCh:
case <-ctx.Done():
return "", fmt.Errorf("context done before to found matching log")

View File

@@ -25,7 +25,7 @@ import (
testpb "google.golang.org/grpc/interop/grpc_testing"
)
// StubServer is borrowed from the interal package of grpc-go.
// StubServer is borrowed from the internal package of grpc-go.
// See https://github.com/grpc/grpc-go/blob/master/internal/stubserver/stubserver.go
// Since it cannot be imported directly, we have to copy and paste it here,
// and useless code for our testing is removed.

View File

@@ -496,7 +496,7 @@ func TestRegisterSelf(t *testing.T) {
}
if err := d.registerSelf(tc.expectedRegValue); err != nil {
t.Errorf("Error occuring on register member self: %v", err)
t.Errorf("Error occurring on register member self: %v", err)
}
if fkv.retries != 0 {

View File

@@ -30,7 +30,7 @@ type watchBroadcasts struct {
donec chan struct{}
}
// maxCoalesceRecievers prevents a popular watchBroadcast from being coalseced.
// maxCoalesceRecievers prevents a popular watchBroadcast from being coalesced.
const maxCoalesceReceivers = 5
func newWatchBroadcasts(wp *watchProxy) *watchBroadcasts {

View File

@@ -613,7 +613,7 @@ func testWatchRestore(t *testing.T, delayBeforeRestore, delayAfterRestore time.D
},
},
{
name: "revsion before first write",
name: "revision before first write",
startRevision: 1,
wantEvents: []mvccpb.Event{
{Type: mvccpb.PUT, Kv: &mvccpb.KeyValue{Key: testKey, Value: testValue, CreateRevision: 2, ModRevision: 2, Version: 1}},