mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Backport go_srcs_in_module changes and fix goword failures.
Signed-off-by: James Blair <mail@jamesblair.net>
This commit is contained in:
@@ -27,7 +27,7 @@ import (
|
||||
"go.uber.org/zap/zaptest"
|
||||
)
|
||||
|
||||
// Test HashByRevValue values to ensure we don't change the output which would
|
||||
// TestHashByRevValue values to ensure we don't change the output which would
|
||||
// have catastrophic consequences. Expected output is just hardcoded, so please
|
||||
// regenerate it every time you change input parameters.
|
||||
func TestHashByRevValue(t *testing.T) {
|
||||
@@ -127,6 +127,7 @@ func testHashByRev(t *testing.T, s *store, rev int64) KeyValueHash {
|
||||
return hash
|
||||
}
|
||||
|
||||
// TestCompactionHash
|
||||
// TODO: Change this to fuzz test
|
||||
func TestCompactionHash(t *testing.T) {
|
||||
b, _ := betesting.NewDefaultTmpBackend(t)
|
||||
|
||||
@@ -529,7 +529,7 @@ func cloneGeneration(g *generation) *generation {
|
||||
return &generation{g.ver, g.created, tmp}
|
||||
}
|
||||
|
||||
// test that compact on version that higher than last modified version works well
|
||||
// TestKeyIndexCompactOnFurtherRev to test that compact on version that higher than last modified version works well
|
||||
func TestKeyIndexCompactOnFurtherRev(t *testing.T) {
|
||||
ki := &keyIndex{key: []byte("foo")}
|
||||
ki.put(zap.NewExample(), 1, 0)
|
||||
|
||||
@@ -360,7 +360,7 @@ func testKVDeleteMultipleTimes(t *testing.T, f deleteRangeFunc) {
|
||||
}
|
||||
}
|
||||
|
||||
// test that range, put, delete on single key in sequence repeatedly works correctly.
|
||||
// TestKVOperationInSequence to test that range, put, delete on single key in sequence repeatedly works correctly.
|
||||
func TestKVOperationInSequence(t *testing.T) {
|
||||
b, tmpPath := betesting.NewDefaultTmpBackend(t)
|
||||
s := NewStore(zap.NewExample(), b, &lease.FakeLessor{}, StoreConfig{})
|
||||
@@ -462,7 +462,7 @@ func TestKVTxnNonBlockRange(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// test that txn range, put, delete on single key in sequence repeatedly works correctly.
|
||||
// TestKVTxnOperationInSequence to test that txn range, put, delete on single key in sequence repeatedly works correctly.
|
||||
func TestKVTxnOperationInSequence(t *testing.T) {
|
||||
b, tmpPath := betesting.NewDefaultTmpBackend(t)
|
||||
s := NewStore(zap.NewExample(), b, &lease.FakeLessor{}, StoreConfig{})
|
||||
|
||||
@@ -94,7 +94,7 @@ func BenchmarkConsistentIndex(b *testing.B) {
|
||||
}
|
||||
}
|
||||
|
||||
// BenchmarkStoreTxnPutUpdate is same as above, but instead updates single key
|
||||
// BenchmarkStorePutUpdate is same as above, but instead updates single key
|
||||
func BenchmarkStorePutUpdate(b *testing.B) {
|
||||
be, tmpPath := betesting.NewDefaultTmpBackend(b)
|
||||
s := NewStore(zap.NewExample(), be, &lease.FakeLessor{}, StoreConfig{})
|
||||
|
||||
@@ -113,9 +113,9 @@ func benchmarkWatchableStoreWatchPut(b *testing.B, synced bool) {
|
||||
}
|
||||
}
|
||||
|
||||
// Benchmarks on cancel function performance for unsynced watchers
|
||||
// in a WatchableStore. It creates k*N watchers to populate unsynced
|
||||
// with a reasonably large number of watchers. And measures the time it
|
||||
// BenchmarkWatchableStoreUnsyncedCancel to benchmark on cancel function performance
|
||||
// for unsynced watchers in a WatchableStore. It creates k*N watchers to populate
|
||||
// unsynced with a reasonably large number of watchers. And measures the time it
|
||||
// takes to cancel N watchers out of k*N watchers. The performance is
|
||||
// expected to differ depending on the unsynced member implementation.
|
||||
// TODO: k is an arbitrary constant. We need to figure out what factor
|
||||
|
||||
Reference in New Issue
Block a user