tests: Migrate key value Get to common framework

This commit is contained in:
nic-chen 2022-03-19 00:51:29 +08:00
parent dca5874d44
commit 3e657bdc50

View File

@ -21,14 +21,14 @@ import (
"time"
"go.etcd.io/etcd/tests/v3/framework/config"
"go.etcd.io/etcd/tests/v3/framework/testutils"
)
func TestAlarm(t *testing.T) {
testRunner.BeforeTest(t)
clus := testRunner.NewCluster(t, config.ClusterConfig{ClusterSize: 3, QuotaBackendBytes: int64(13 * os.Getpagesize())})
defer clus.Close()
testutils.ExecuteWithTimeout(t, 10*time.Second, func() {
// test small put still works
smallbuf := strings.Repeat("a", 64)
if err := clus.Client().Put("1st_test", smallbuf); err != nil {
@ -90,4 +90,5 @@ func TestAlarm(t *testing.T) {
if err := clus.Client().Put("4th_test", smallbuf); err != nil {
t.Fatal(err)
}
})
}