github.com/darrenli6/fabric-sdk-example@v0.0.0-20220109053535-94b13b56df8c/test/feature/orderer.feature (about) 1 # Copyright IBM Corp. 2017 All Rights Reserved. 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 # 15 16 Feature: Orderer Service 17 As a user I want to be able to have my transactions ordered correctly 18 19 @skip 20 Scenario: FAB-1335: Resilient Kafka Orderer and Brokers 21 Given the kafka default replication factor is 3 22 And the orderer Batchsize MaxMessageCount is 20 23 And the orderer BatchTimeout is 10 minutes 24 And a bootstrapped orderer network of type kafka with 3 brokers 25 When 10 unique messages are broadcasted 26 Then we get 10 successful broadcast responses 27 When the topic partition leader is stopped 28 And 10 unique messages are broadcasted 29 Then we get 10 successful broadcast responses 30 And all 20 messages are delivered in 1 block 31 32 @skip 33 Scenario: FAB-1306: Adding a new Kafka Broker 34 Given a kafka cluster 35 And an orderer connected to the kafka cluster 36 When a new organization NewOrg certificate is added 37 Then the NewOrg is able to connect to the kafka cluster 38 39 @skip 40 Scenario: FAB-1306: Multiple organizations in a kafka cluster, remove 1 41 Given a certificate from Org1 is added to the kafka orderer network 42 And a certificate from Org2 is added to the kafka orderer network 43 And an orderer connected to the kafka cluster 44 When authorization for Org2 is removed from the kafka cluster 45 Then the Org2 cannot connect to the kafka cluster 46 47 @skip 48 Scenario: FAB-1306: Multiple organizations in a cluster - remove all, reinstate 1. 49 Given a certificate from Org1 is added to the kafka orderer network 50 And a certificate from Org2 is added to the kafka orderer network 51 And a certificate from Org3 is added to the kafka orderer network 52 And an orderer connected to the kafka cluster 53 When authorization for Org2 is removed from the kafka cluster 54 Then the Org2 cannot connect to the kafka cluster 55 And the orderer functions successfully 56 When authorization for Org1 is removed from the kafka cluster 57 Then the Org1 cannot connect to the kafka cluster 58 And the orderer functions successfully 59 When authorization for Org3 is removed from the kafka cluster 60 Then the Org3 cannot connect to the kafka cluster 61 And the zookeeper notifies the orderer of the disconnect 62 And the orderer stops sending messages to the cluster 63 When authorization for Org1 is added to the kafka cluster 64 And I wait "15" seconds 65 Then the Org1 is able to connect to the kafka cluster 66 And the orderer functions successfully 67 68 @skip 69 Scenario: FAB-3851: Message Payloads Greater than 1MB 70 Given I have a bootstrapped fabric network 71 When a user deploys chaincode 72 Then the chaincode is deployed 73 74 @daily 75 Scenario: FAB-4686: Test taking down all kafka brokers and bringing back last 3 76 Given I have a bootstrapped fabric network of type kafka 77 And I wait "60" seconds 78 When a user deploys chaincode at path "github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02" with ["init","a","1000","b","2000"] with name "mycc" 79 And I wait "30" seconds 80 Then the chaincode is deployed 81 When a user invokes on the chaincode named "mycc" with args ["invoke","a","b","10"] 82 And a user queries on the chaincode named "mycc" with args ["query","a"] 83 Then a user receives expected response of 990 84 85 Given "kafka0" is taken down 86 And I wait "5" seconds 87 When a user invokes on the chaincode named "mycc" with args ["invoke","a","b","10"] 88 When a user queries on the chaincode with args ["query","a"] 89 Then a user receives expected response of 980 90 91 Given "kafka1" is taken down 92 And "kafka2" is taken down 93 And "kafka3" is taken down 94 And I wait "5" seconds 95 When a user invokes on the chaincode named "mycc" with args ["invoke","a","b","10"] 96 And a user queries on the chaincode named "mycc" with args ["query","a"] 97 Then a user receives expected response of 980 98 And I wait "5" seconds 99 100 Given "kafka3" comes back up 101 And "kafka2" comes back up 102 And "kafka1" comes back up 103 And I wait "240" seconds 104 When a user invokes on the chaincode named "mycc" with args ["invoke","a","b","10"] 105 When a user queries on the chaincode named "mycc" with args ["query","a"] 106 Then a user receives expected response of 970 107 108 @skip 109 #@doNotDecompose 110 Scenario Outline: FAB-3937: Message Broadcast 111 Given a bootstrapped orderer network of type <type> 112 When a message is broadcasted 113 Then we get a successful broadcast response 114 Examples: 115 | type | 116 | solo | 117 | kafka | 118 119 @skip 120 Scenario Outline: FAB-3938: Broadcasted message delivered. 121 Given a bootstrapped orderer network of type <type> 122 When 1 unique messages are broadcasted 123 Then all 1 messages are delivered within 10 seconds 124 Examples: 125 | type | 126 | solo | 127 | kafka |