comments: fix comments as per goword in go _test pkg files

Comments fixed as per goword in go _test package files that
shell function go_srcs_in_module lists as per changes on #14827

Helps in #14827

Signed-off-by: Bhargav Ravuri <bhargav.ravuri@infracloud.io>
This commit is contained in:
Bhargav Ravuri 2022-11-24 00:03:00 +05:30
parent 18463081ad
commit dbfe42bbd2
5 changed files with 50 additions and 37 deletions

View File

@ -20,7 +20,7 @@ import (
pb "go.etcd.io/etcd/api/v3/etcdserverpb"
)
// TestInvalidGoYypeIntPanic tests conditions that caused
// TestInvalidGoTypeIntPanic tests conditions that caused
// panic: invalid Go type int for field k8s_io.kubernetes.vendor.go_etcd_io.etcd.etcdserver.etcdserverpb.loggablePutRequest.value_size
// See https://github.com/kubernetes/kubernetes/issues/91937 for more details
func TestInvalidGoTypeIntPanic(t *testing.T) {

View File

@ -135,7 +135,7 @@ func TestPrQueueManyReaderManyWriter(t *testing.T) {
testReadersWriters(t, rqs, wqs)
}
// BenchmarkQueue benchmarks Queues using n/n readers/writers
// BenchmarkPrQueueOneReaderOneWriter benchmarks Queues using n/n readers/writers
func BenchmarkPrQueueOneReaderOneWriter(b *testing.B) {
integration2.BeforeTest(b)

View File

@ -183,6 +183,7 @@ func TestLeaseKeepAliveOneSecond(t *testing.T) {
}
}
// TestLeaseKeepAliveHandleFailure tests lease keep alive handling faillure
// TODO: add a client that can connect to all the members of cluster via unix sock.
// TODO: test handle more complicated failures.
func TestLeaseKeepAliveHandleFailure(t *testing.T) {
@ -490,7 +491,7 @@ func TestLeaseKeepAliveInitTimeout(t *testing.T) {
clus.Members[0].Restart(t)
}
// TestLeaseKeepAliveInitTimeout ensures the keep alive channel closes if
// TestLeaseKeepAliveTTLTimeout ensures the keep alive channel closes if
// a keep alive request after the first never gets a response.
func TestLeaseKeepAliveTTLTimeout(t *testing.T) {
integration2.BeforeTest(t)

View File

@ -23,7 +23,7 @@ import (
integration2 "go.etcd.io/etcd/tests/v3/framework/integration"
)
// Ensure that the store can recover from a previously saved state.
// TestStoreRecover ensures that the store can recover from a previously saved state.
func TestStoreRecover(t *testing.T) {
integration2.BeforeTest(t)
s := v2store.New()

View File

@ -39,7 +39,7 @@ func TestNewStoreWithNamespaces(t *testing.T) {
testutil.AssertNil(t, err)
}
// Ensure that the store can retrieve an existing value.
// TestStoreGetValue ensures that the store can retrieve an existing value.
func TestStoreGetValue(t *testing.T) {
s := v2store.New()
@ -53,7 +53,7 @@ func TestStoreGetValue(t *testing.T) {
assert.Equal(t, *e.Node.Value, "bar")
}
// Ensure that the store can retrieve a directory in sorted order.
// TestStoreGetSorted ensures that the store can retrieve a directory in sorted order.
func TestStoreGetSorted(t *testing.T) {
s := v2store.New()
@ -171,7 +171,7 @@ func TestSet(t *testing.T) {
assert.Equal(t, e.Node.ModifiedIndex, uint64(5))
}
// Ensure that the store can create a new key if it doesn't already exist.
// TestStoreCreateValue ensures that the store can create a new key if it doesn't already exist.
func TestStoreCreateValue(t *testing.T) {
s := v2store.New()
@ -205,7 +205,7 @@ func TestStoreCreateValue(t *testing.T) {
}
// Ensure that the store can create a new directory if it doesn't already exist.
// TestStoreCreateDirectory ensures that the store can create a new directory if it doesn't already exist.
func TestStoreCreateDirectory(t *testing.T) {
s := v2store.New()
@ -218,7 +218,7 @@ func TestStoreCreateDirectory(t *testing.T) {
testutil.AssertTrue(t, e.Node.Dir)
}
// Ensure that the store fails to create a key if it already exists.
// TestStoreCreateFailsIfExists ensure that the store fails to create a key if it already exists.
func TestStoreCreateFailsIfExists(t *testing.T) {
s := v2store.New()
@ -235,7 +235,7 @@ func TestStoreCreateFailsIfExists(t *testing.T) {
testutil.AssertNil(t, e)
}
// Ensure that the store can update a key if it already exists.
// TestStoreUpdateValue ensures that the store can update a key if it already exists.
func TestStoreUpdateValue(t *testing.T) {
s := v2store.New()
@ -284,7 +284,7 @@ func TestStoreUpdateValue(t *testing.T) {
assert.Equal(t, *e.Node.Value, "")
}
// Ensure that the store cannot update a directory.
// TestStoreUpdateFailsIfDirectory ensures that the store cannot update a directory.
func TestStoreUpdateFailsIfDirectory(t *testing.T) {
s := v2store.New()
@ -297,7 +297,7 @@ func TestStoreUpdateFailsIfDirectory(t *testing.T) {
testutil.AssertNil(t, e)
}
// Ensure that the store can delete a value.
// TestStoreDeleteValue ensures that the store can delete a value.
func TestStoreDeleteValue(t *testing.T) {
s := v2store.New()
@ -313,7 +313,7 @@ func TestStoreDeleteValue(t *testing.T) {
assert.Equal(t, *e.PrevNode.Value, "bar")
}
// Ensure that the store can delete a directory if recursive is specified.
// TestStoreDeleteDirectory ensures that the store can delete a directory if recursive is specified.
func TestStoreDeleteDirectory(t *testing.T) {
s := v2store.New()
@ -349,8 +349,8 @@ func TestStoreDeleteDirectory(t *testing.T) {
}
// Ensure that the store cannot delete a directory if both of recursive
// and dir are not specified.
// TestStoreDeleteDirectoryFailsIfNonRecursiveAndDir ensures that the
// store cannot delete a directory if both of recursive and dir are not specified.
func TestStoreDeleteDirectoryFailsIfNonRecursiveAndDir(t *testing.T) {
s := v2store.New()
@ -450,7 +450,7 @@ func TestStoreCompareAndDeletePrevIndexFailsIfNotMatch(t *testing.T) {
assert.Equal(t, *e.Node.Value, "bar")
}
// Ensure that the store cannot delete a directory.
// TestStoreCompareAndDeleteDirectoryFail ensures that the store cannot delete a directory.
func TestStoreCompareAndDeleteDirectoryFail(t *testing.T) {
s := v2store.New()
@ -461,7 +461,8 @@ func TestStoreCompareAndDeleteDirectoryFail(t *testing.T) {
assert.Equal(t, err.ErrorCode, v2error.EcodeNotFile)
}
// Ensure that the store can conditionally update a key if it has a previous value.
// TestStoreCompareAndSwapPrevValue ensures that the store can conditionally
// update a key if it has a previous value.
func TestStoreCompareAndSwapPrevValue(t *testing.T) {
s := v2store.New()
@ -483,7 +484,8 @@ func TestStoreCompareAndSwapPrevValue(t *testing.T) {
assert.Equal(t, *e.Node.Value, "baz")
}
// Ensure that the store cannot conditionally update a key if it has the wrong previous value.
// TestStoreCompareAndSwapPrevValueFailsIfNotMatch ensure that the store cannot
// conditionally update a key if it has the wrong previous value.
func TestStoreCompareAndSwapPrevValueFailsIfNotMatch(t *testing.T) {
s := v2store.New()
var eidx uint64 = 1
@ -498,7 +500,8 @@ func TestStoreCompareAndSwapPrevValueFailsIfNotMatch(t *testing.T) {
assert.Equal(t, e.EtcdIndex, eidx)
}
// Ensure that the store can conditionally update a key if it has a previous index.
// TestStoreCompareAndSwapPrevIndex ensures that the store can conditionally
// update a key if it has a previous index.
func TestStoreCompareAndSwapPrevIndex(t *testing.T) {
s := v2store.New()
var eidx uint64 = 2
@ -520,7 +523,8 @@ func TestStoreCompareAndSwapPrevIndex(t *testing.T) {
assert.Equal(t, e.EtcdIndex, eidx)
}
// Ensure that the store cannot conditionally update a key if it has the wrong previous index.
// TestStoreCompareAndSwapPrevIndexFailsIfNotMatch ensures that the store cannot
// conditionally update a key if it has the wrong previous index.
func TestStoreCompareAndSwapPrevIndexFailsIfNotMatch(t *testing.T) {
s := v2store.New()
var eidx uint64 = 1
@ -535,7 +539,7 @@ func TestStoreCompareAndSwapPrevIndexFailsIfNotMatch(t *testing.T) {
assert.Equal(t, *e.Node.Value, "bar")
}
// Ensure that the store can watch for key creation.
// TestStoreWatchCreate ensures that the store can watch for key creation.
func TestStoreWatchCreate(t *testing.T) {
s := v2store.New()
var eidx uint64 = 0
@ -555,7 +559,8 @@ func TestStoreWatchCreate(t *testing.T) {
}
}
// Ensure that the store can watch for recursive key creation.
// TestStoreWatchRecursiveCreate ensures that the store
// can watch for recursive key creation.
func TestStoreWatchRecursiveCreate(t *testing.T) {
s := v2store.New()
var eidx uint64 = 0
@ -570,7 +575,7 @@ func TestStoreWatchRecursiveCreate(t *testing.T) {
assert.Equal(t, e.Node.Key, "/foo/bar")
}
// Ensure that the store can watch for key updates.
// TestStoreWatchUpdate ensures that the store can watch for key updates.
func TestStoreWatchUpdate(t *testing.T) {
s := v2store.New()
var eidx uint64 = 1
@ -585,7 +590,7 @@ func TestStoreWatchUpdate(t *testing.T) {
assert.Equal(t, e.Node.Key, "/foo")
}
// Ensure that the store can watch for recursive key updates.
// TestStoreWatchRecursiveUpdate ensures that the store can watch for recursive key updates.
func TestStoreWatchRecursiveUpdate(t *testing.T) {
s := v2store.New()
var eidx uint64 = 1
@ -601,7 +606,7 @@ func TestStoreWatchRecursiveUpdate(t *testing.T) {
assert.Equal(t, e.Node.Key, "/foo/bar")
}
// Ensure that the store can watch for key deletions.
// TestStoreWatchDelete ensures that the store can watch for key deletions.
func TestStoreWatchDelete(t *testing.T) {
s := v2store.New()
var eidx uint64 = 1
@ -616,7 +621,7 @@ func TestStoreWatchDelete(t *testing.T) {
assert.Equal(t, e.Node.Key, "/foo")
}
// Ensure that the store can watch for recursive key deletions.
// TestStoreWatchRecursiveDelete ensures that the store can watch for recursive key deletions.
func TestStoreWatchRecursiveDelete(t *testing.T) {
s := v2store.New()
var eidx uint64 = 1
@ -632,7 +637,7 @@ func TestStoreWatchRecursiveDelete(t *testing.T) {
assert.Equal(t, e.Node.Key, "/foo/bar")
}
// Ensure that the store can watch for CAS updates.
// TestStoreWatchCompareAndSwap ensures that the store can watch for CAS updates.
func TestStoreWatchCompareAndSwap(t *testing.T) {
s := v2store.New()
var eidx uint64 = 1
@ -647,7 +652,8 @@ func TestStoreWatchCompareAndSwap(t *testing.T) {
assert.Equal(t, e.Node.Key, "/foo")
}
// Ensure that the store can watch for recursive CAS updates.
// TestStoreWatchRecursiveCompareAndSwap ensures that the
// store can watch for recursive CAS updates.
func TestStoreWatchRecursiveCompareAndSwap(t *testing.T) {
s := v2store.New()
var eidx uint64 = 1
@ -662,7 +668,7 @@ func TestStoreWatchRecursiveCompareAndSwap(t *testing.T) {
assert.Equal(t, e.Node.Key, "/foo/bar")
}
// Ensure that the store can watch in streaming mode.
// TestStoreWatchStream ensures that the store can watch in streaming mode.
func TestStoreWatchStream(t *testing.T) {
s := v2store.New()
var eidx uint64 = 1
@ -694,7 +700,8 @@ func TestStoreWatchStream(t *testing.T) {
}
}
// Ensure that the store can watch for hidden keys as long as it's an exact path match.
// TestStoreWatchCreateWithHiddenKey ensure that the store can
// watch for hidden keys as long as it's an exact path match.
func TestStoreWatchCreateWithHiddenKey(t *testing.T) {
s := v2store.New()
var eidx uint64 = 1
@ -711,7 +718,8 @@ func TestStoreWatchCreateWithHiddenKey(t *testing.T) {
}
}
// Ensure that the store doesn't see hidden key creates without an exact path match in recursive mode.
// TestStoreWatchRecursiveCreateWithHiddenKey ensures that the store doesn't
// see hidden key creates without an exact path match in recursive mode.
func TestStoreWatchRecursiveCreateWithHiddenKey(t *testing.T) {
s := v2store.New()
w, _ := s.Watch("/foo", true, false, 0)
@ -733,7 +741,8 @@ func TestStoreWatchRecursiveCreateWithHiddenKey(t *testing.T) {
}
}
// Ensure that the store doesn't see hidden key updates.
// TestStoreWatchUpdateWithHiddenKey ensures that the store
// doesn't see hidden key updates.
func TestStoreWatchUpdateWithHiddenKey(t *testing.T) {
s := v2store.New()
s.Create("/_foo", false, "bar", false, v2store.TTLOptionSet{ExpireTime: v2store.Permanent})
@ -746,7 +755,8 @@ func TestStoreWatchUpdateWithHiddenKey(t *testing.T) {
testutil.AssertNil(t, e)
}
// Ensure that the store doesn't see hidden key updates without an exact path match in recursive mode.
// TestStoreWatchRecursiveUpdateWithHiddenKey ensures that the store doesn't
// see hidden key updates without an exact path match in recursive mode.
func TestStoreWatchRecursiveUpdateWithHiddenKey(t *testing.T) {
s := v2store.New()
s.Create("/foo/_bar", false, "baz", false, v2store.TTLOptionSet{ExpireTime: v2store.Permanent})
@ -756,7 +766,7 @@ func TestStoreWatchRecursiveUpdateWithHiddenKey(t *testing.T) {
testutil.AssertNil(t, e)
}
// Ensure that the store can watch for key deletions.
// TestStoreWatchDeleteWithHiddenKey ensures that the store can watch for key deletions.
func TestStoreWatchDeleteWithHiddenKey(t *testing.T) {
s := v2store.New()
var eidx uint64 = 2
@ -771,7 +781,8 @@ func TestStoreWatchDeleteWithHiddenKey(t *testing.T) {
testutil.AssertNil(t, e)
}
// Ensure that the store doesn't see hidden key deletes without an exact path match in recursive mode.
// TestStoreWatchRecursiveDeleteWithHiddenKey ensures that the store doesn't see
// hidden key deletes without an exact path match in recursive mode.
func TestStoreWatchRecursiveDeleteWithHiddenKey(t *testing.T) {
s := v2store.New()
s.Create("/foo/_bar", false, "baz", false, v2store.TTLOptionSet{ExpireTime: v2store.Permanent})
@ -781,7 +792,8 @@ func TestStoreWatchRecursiveDeleteWithHiddenKey(t *testing.T) {
testutil.AssertNil(t, e)
}
// Ensure that the store does see hidden key creates if watching deeper than a hidden key in recursive mode.
// TestStoreWatchRecursiveCreateDeeperThanHiddenKey ensures that the store does see
// hidden key creates if watching deeper than a hidden key in recursive mode.
func TestStoreWatchRecursiveCreateDeeperThanHiddenKey(t *testing.T) {
s := v2store.New()
var eidx uint64 = 1
@ -795,7 +807,7 @@ func TestStoreWatchRecursiveCreateDeeperThanHiddenKey(t *testing.T) {
assert.Equal(t, e.Node.Key, "/_foo/bar/baz")
}
// Ensure that slow consumers are handled properly.
// TestStoreWatchSlowConsumer ensures that slow consumers are handled properly.
//
// Since Watcher.EventChan() has a buffer of size 100 we can only queue 100
// event per watcher. If the consumer cannot consume the event on time and