integration/clientv3/exp/recipes: Fix lock test

TestMutexTryLock(SingleNode|MultiNode) were being skipped as they had duplicate calls to integration2.BeginTest. These duplicate calls registered a second handler for leak detection which failed and skipped the test as the wrappers had already started a cluster.

part of #13698
This commit is contained in:
Danielle Lancashire
2022-03-15 17:42:47 +00:00
parent bfb9aa4205
commit 3bbbef54c1

View File

@@ -21,7 +21,7 @@ import (
"time"
"go.etcd.io/etcd/api/v3/mvccpb"
"go.etcd.io/etcd/client/v3"
clientv3 "go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/client/v3/concurrency"
recipe "go.etcd.io/etcd/client/v3/experimental/recipes"
integration2 "go.etcd.io/etcd/tests/v3/framework/integration"
@@ -113,8 +113,6 @@ func TestMutexTryLockMultiNode(t *testing.T) {
}
func testMutexTryLock(t *testing.T, lockers int, chooseClient func() *clientv3.Client) {
integration2.BeforeTest(t)
lockedC := make(chan *concurrency.Mutex)
notlockedC := make(chan *concurrency.Mutex)
stopC := make(chan struct{})