diff --git a/orderer/common/cluster/clusterservice_test.go b/orderer/common/cluster/clusterservice_test.go index e324d1f4014..b8ad8374618 100644 --- a/orderer/common/cluster/clusterservice_test.go +++ b/orderer/common/cluster/clusterservice_test.go @@ -925,7 +925,6 @@ func TestClusterRequestAsString(t *testing.T) { } for _, tc := range tcs { - tc := tc t.Run(tc.name, func(t *testing.T) { t.Parallel() retVal := cluster.ClusterRequestAsString(tc.input) diff --git a/orderer/common/cluster/comm_test.go b/orderer/common/cluster/comm_test.go index 8ad5d1471da..31c7be2300b 100644 --- a/orderer/common/cluster/comm_test.go +++ b/orderer/common/cluster/comm_test.go @@ -813,7 +813,6 @@ func TestAbortRPC(t *testing.T) { } for _, testCase := range testCases { - testCase := testCase t.Run(testCase.name, func(t *testing.T) { testAbort(t, testCase.abortFunc, testCase.rpcTimeout, testCase.expectedErr) }) @@ -1377,7 +1376,6 @@ func TestMetrics(t *testing.T) { }, }, } { - testCase := testCase t.Run(testCase.name, func(t *testing.T) { fakeProvider := &mocks.MetricsProvider{} testCase.testMetrics = &testMetrics{ diff --git a/orderer/common/cluster/commauth_test.go b/orderer/common/cluster/commauth_test.go index 09f0a2f9228..f44563b1331 100644 --- a/orderer/common/cluster/commauth_test.go +++ b/orderer/common/cluster/commauth_test.go @@ -457,7 +457,6 @@ func TestBuildStepRespone(t *testing.T) { }, } for _, tc := range tcs { - tc := tc t.Run(tc.name, func(t *testing.T) { t.Parallel() res, err := cluster.BuildStepRespone(tc.input) diff --git a/orderer/common/cluster/deliver_test.go b/orderer/common/cluster/deliver_test.go index 058eb26b01f..ff6c820b1a1 100644 --- a/orderer/common/cluster/deliver_test.go +++ b/orderer/common/cluster/deliver_test.go @@ -1020,7 +1020,6 @@ func TestBlockPullerFailures(t *testing.T) { failFunc: malformBlockSignatureAndRecreateOSNBuffer, }, } { - testCase := testCase t.Run(testCase.name, func(t *testing.T) { testLogger.Infof("Starting test case: %s", testCase.name) osn := newClusterNode(t) @@ -1130,7 +1129,6 @@ func TestBlockPullerBadBlocks(t *testing.T) { } for _, testCase := range testcases { - testCase := testCase t.Run(testCase.name, func(t *testing.T) { osn := newClusterNode(t) defer osn.stop() diff --git a/orderer/common/cluster/service_test.go b/orderer/common/cluster/service_test.go index 11a2ed4c979..fb082c6c98f 100644 --- a/orderer/common/cluster/service_test.go +++ b/orderer/common/cluster/service_test.go @@ -160,7 +160,6 @@ func TestSubmitFailure(t *testing.T) { } for _, testCase := range testCases { - testCase := testCase t.Run(testCase.name, func(t *testing.T) { dispatcher := &mocks.Dispatcher{} stream := &mocks.StepStream{} diff --git a/orderer/common/cluster/util_test.go b/orderer/common/cluster/util_test.go index 32af63102be..8059033938b 100644 --- a/orderer/common/cluster/util_test.go +++ b/orderer/common/cluster/util_test.go @@ -293,7 +293,6 @@ func TestVerifyBlockHash(t *testing.T) { }, }, } { - testCase := testCase t.Run(testCase.name, func(t *testing.T) { blockchain := createBlockChain(start, end) blockchain = testCase.mutateBlockSequence(blockchain) @@ -693,7 +692,6 @@ func TestLastConfigBlock(t *testing.T) { blockRetriever: blockRetriever, }, } { - testCase := testCase t.Run(testCase.name, func(t *testing.T) { block, err := cluster.LastConfigBlock(testCase.block, testCase.blockRetriever) if testCase.expectedError == "" { @@ -1267,7 +1265,6 @@ func TestCompareCertPublicKeysErrorHandling(t *testing.T) { } for _, tc := range testCases { - tc := tc t.Run(tc.name, func(t *testing.T) { t.Parallel() @@ -1325,7 +1322,6 @@ func TestCompareCertPublicKeysWithMalformedCertificates(t *testing.T) { } for _, tc := range testCases { - tc := tc t.Run(tc.name, func(t *testing.T) { t.Parallel() diff --git a/orderer/consensus/etcdraft/eviction_test.go b/orderer/consensus/etcdraft/eviction_test.go index a27450f7bdc..4436bc88bff 100644 --- a/orderer/consensus/etcdraft/eviction_test.go +++ b/orderer/consensus/etcdraft/eviction_test.go @@ -213,7 +213,6 @@ func TestEvictionSuspector(t *testing.T) { }, }, } { - testCase := testCase t.Run(testCase.description, func(t *testing.T) { committedBlocks := make(chan *common.Block, 2) diff --git a/orderer/consensus/smartbft/configverifier_test.go b/orderer/consensus/smartbft/configverifier_test.go index 03c67b22b7e..b0f64f45341 100644 --- a/orderer/consensus/smartbft/configverifier_test.go +++ b/orderer/consensus/smartbft/configverifier_test.go @@ -237,7 +237,6 @@ func TestValidateConfig(t *testing.T) { expectedError: "error proposing config update", }, } { - testCase := testCase t.Run(testCase.name, func(t *testing.T) { cup := &mocks.ConfigUpdateProposer{} f := &mocks.Filters{}