Skip to content

Commit

Permalink
[FAB-3289] Fix multi-broker Kafka BDD test
Browse files Browse the repository at this point in the history
This changeset corrects the timing assumptions and orderer references
that prevented the multi-broker Kafka test (last configuration on the
"Orderer Options" Examples table) from passing.

Change-Id: I8ec88f64fd3c899d3c3de8a77cead5eac0df8940
Signed-off-by: Kostas Christidis <kostas@christidis.io>
  • Loading branch information
kchristidis committed May 17, 2017
1 parent 689b8f4 commit 552cbfe
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions bddtests/features/bootstrap.feature
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Feature: Bootstrap

And the user "dev0Org0" using cert alias "dev0Org0App1" broadcasts ConfigUpdate Tx "configUpdateTx1" to orderer "<orderer0>" to create channel "com.acme.blockchain.jdoe.Channel1"

# Sleep as the deliver takes a bit to have the first block ready
# Sleep as the local orderer ledger needs to create the block that corresponds to the start number of the seek request
And I wait "<BroadcastWaitTime>" seconds

When user "dev0Org0" using cert alias "dev0Org0App1" connects to deliver function on orderer "<orderer0>"
Expand Down Expand Up @@ -257,8 +257,8 @@ Feature: Bootstrap

And the user "configAdminPeerOrg0" broadcasts transaction "instantiateTx1" to orderer "<orderer1>" on channel "com.acme.blockchain.jdoe.Channel1"

# Sleep as the deliver takes a bit to have the first block ready
And I wait "2" seconds
# Sleep as the local orderer ledger needs to create the block that corresponds to the start number of the seek request
And I wait "<BroadcastWaitTime>" seconds

And user "configAdminPeerOrg0" using cert alias "config-admin-cert" connects to deliver function on orderer "<orderer0>"

Expand All @@ -268,10 +268,9 @@ Feature: Bootstrap

Then user "configAdminPeerOrg0" should get a delivery "deliveredInstantiateTx1Block" from "<orderer0>" of "1" blocks with "1" messages within "1" seconds

# Sleep as the deliver takes a bit to have the first block ready
# Sleep to allow for chaincode instantiation on the peer
And I wait "3" seconds


# Entry point for invoking on an existing channel
When user "dev0Org0" creates a chaincode invocation spec "querySpec1" using spec "cc_spec" with input:
| funcName | arg1 |
Expand Down Expand Up @@ -323,8 +322,8 @@ Feature: Bootstrap

And the user "dev0Org0" broadcasts transaction "invokeTx1" to orderer "<orderer2>" on channel "com.acme.blockchain.jdoe.Channel1"

# Sleep as the deliver takes a bit to have the first block ready
And I wait "3" seconds
# Sleep as the local orderer ledger needs to create the block that corresponds to the start number of the seek request
And I wait "<BroadcastWaitTime>" seconds

And user "dev0Org0" sends deliver a seek request on orderer "<orderer0>" with properties:
| ChainId | Start | End |
Expand All @@ -338,7 +337,7 @@ Feature: Bootstrap
Examples: Orderer Options
| ComposeFile | SystemUpWaitTime | ConsensusType | BroadcastWaitTime | orderer0 | orderer1 | orderer2 |Orderer Specific Info|
| docker-compose-next-4.yml | 0 | solo | 2 | orderer0 | orderer0 | orderer0 | |
# | docker-compose-next-4.yml ./environments/orderer-1-kafka-1/docker-compose.yml orderer-3-kafka-1.yml | 5 | kafka | 5 | orderer0 | orderer1 | orderer2 | |
# | docker-compose-next-4.yml ./environments/orderer-1-kafka-1/docker-compose.yml orderer-3-kafka-1.yml | 10 | kafka | 7 | orderer0 | orderer1 | orderer2 | |
# | docker-compose-next-4.yml docker-compose-next-4-couchdb.yml | 10 | solo | 2 | orderer0 | orderer0 | orderer0 | |
# | docker-compose-next-4.yml docker-compose-next-4-couchdb.yml ./environments/orderer-1-kafka-1/docker-compose.yml orderer-3-kafka-1.yml | 10 | kafka | 5 | orderer0 | orderer1 | orderer2 | |
# | docker-compose-next-4.yml ./environments/orderer-1-kafka-3/docker-compose.yml | 5 | kafka | 5 | orderer0 | orderer1 | orderer2 | |
# | docker-compose-next-4.yml docker-compose-next-4-couchdb.yml ./environments/orderer-1-kafka-1/docker-compose.yml orderer-3-kafka-1.yml | 10 | kafka | 7 | orderer0 | orderer1 | orderer2 | |
# | docker-compose-next-4.yml ./environments/orderer-1-kafka-3/docker-compose.yml | 10 | kafka | 7 | orderer0 | orderer0 | orderer0 | |

0 comments on commit 552cbfe

Please sign in to comment.