Skip to content
This repository has been archived by the owner on Apr 5, 2023. It is now read-only.

Commit

Permalink
Merge pull request #98 from bstasyszyn/97
Browse files Browse the repository at this point in the history
chore: Save CC invoke response
  • Loading branch information
bstasyszyn authored Aug 21, 2020
2 parents d5d9b9e + 9131eae commit 722ca33
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bddtests/common_steps.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,7 @@ func (d *CommonSteps) invokeCCWithArgs(ccID, channelID, clientOrgID string, targ
return channel.Response{}, fmt.Errorf("Failed to create new channel client: %s", err)
}

retryOpts := retry.DefaultOpts
retryOpts.RetryableCodes = retry.ChannelClientRetryableCodes
retryOpts := retry.DefaultChannelOpts

for _, code := range ccCodesForRetry {
addRetryCode(retryOpts.RetryableCodes, status.ChaincodeStatus, status.Code(code))
Expand All @@ -396,6 +395,9 @@ func (d *CommonSteps) invokeCCWithArgs(ccID, channelID, clientOrgID string, targ
if err != nil {
return channel.Response{}, fmt.Errorf("InvokeChaincode return error: %s", err)
}

queryValue = string(response.Payload)

return response, nil
}

Expand Down Expand Up @@ -638,7 +640,7 @@ func (d *CommonSteps) QueryCCWithOpts(systemCC bool, ccID, channelID, clientOrgI
return "", errors.Wrap(err, "Failed to create new channel client")
}

retryOpts := retry.DefaultOpts
retryOpts := retry.DefaultChannelOpts
retryOpts.RetryableCodes = retry.ChannelClientRetryableCodes

for _, code := range ccCodesForRetry {
Expand Down

0 comments on commit 722ca33

Please sign in to comment.