Skip to content

Commit 3c34bc2

Browse files
Saad Karimsykesm
authored andcommitted
[FAB-9623] theChaincodeSupport is finally dead
Change-Id: I8f8212009df3ccf42955e23adf299d02cc1c6bf7 Signed-off-by: Matthew Sykes <sykesmat@us.ibm.com>
1 parent eea281b commit 3c34bc2

File tree

7 files changed

+344
-346
lines changed

7 files changed

+344
-346
lines changed

core/chaincode/chaincode_support_test.go

Lines changed: 57 additions & 60 deletions
Large diffs are not rendered by default.

core/chaincode/concurrency_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,17 @@ import (
3333
func TestExecuteConcurrentInvokes(t *testing.T) {
3434
//this test fails occasionally. FAB-1600 is opened to track this issue
3535
//skip meanwhile so as to not block CI
36+
3637
t.Skip()
3738
chainID := util.GetTestChainID()
3839

39-
lis, err := initPeer(chainID)
40+
_, chaincodeSupport, cleanup, err := initPeer(chainID)
4041
if err != nil {
4142
t.Fail()
4243
t.Logf("Error creating peer: %s", err)
4344
}
4445

45-
defer finitPeer(lis, chainID)
46+
defer cleanup()
4647

4748
var ctxt = context.Background()
4849

@@ -56,10 +57,10 @@ func TestExecuteConcurrentInvokes(t *testing.T) {
5657

5758
cccid := ccprovider.NewCCContext(chainID, "nkpi", "0", "", false, nil, nil)
5859

59-
defer theChaincodeSupport.Stop(ctxt, cccid, &pb.ChaincodeDeploymentSpec{ChaincodeSpec: spec})
60+
defer chaincodeSupport.Stop(ctxt, cccid, &pb.ChaincodeDeploymentSpec{ChaincodeSpec: spec})
6061

6162
var nextBlockNumber uint64
62-
_, err = deploy(ctxt, cccid, spec, nextBlockNumber)
63+
_, err = deploy(ctxt, cccid, spec, nextBlockNumber, chaincodeSupport)
6364
nextBlockNumber++
6465
if err != nil {
6566
t.Fail()
@@ -90,7 +91,7 @@ func TestExecuteConcurrentInvokes(t *testing.T) {
9091
spec = &pb.ChaincodeSpec{Type: 1, ChaincodeId: chaincodeID, Input: &pb.ChaincodeInput{Args: args}}
9192

9293
//start with a new background
93-
_, _, results[qnum], err = invoke(context.Background(), chainID, spec, nextBlockNumber, nil)
94+
_, _, results[qnum], err = invoke(context.Background(), chainID, spec, nextBlockNumber, nil, chaincodeSupport)
9495

9596
if err != nil {
9697
errs[qnum] = fmt.Errorf("Error executing <%s>: %s", chaincodeID.Name, err)

core/chaincode/exectransaction_test.go

Lines changed: 171 additions & 172 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)