You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://jira.hyperledger.org/browse/FAB-1658
In FAB-1382 [1] the Deliver API was modified so as to work with a range.
The BDD implementation of Deliver was also modified in that changeset so
as to take an end block of `NEWEST`.
Occasionally, the Kafka orderer will fail on one of these BDD tests
because the Deliver request comes before all the incoming (via
Broadcast) messages have been processed. In that case, the `NEWEST`
value is translated to a lower-numbered block than the expected one.
As an example, consider the case where we send 100 messages to the
orderer, and each block has 10 messages. When we send the Deliver call,
Kafka has processed 90 messages, so it translates NEWEST to 9. Our test
expects NEWEST to be 10 and thus fails.
Until we find an elegant fix for this, I am adding a 1-second sleep
before the Deliver call is invoked on the Kafka cases. This should add
14 seconds to the duration of these tests.
I stress that this is a temporary patch, and I am open to a more elegant
solution, but until then, the default should not be a setup where the
orderer fails occasionally.
[1] https://gerrit.hyperledger.org/r/#/c/3271/
Change-Id: I77a091546e77981838a4b8ee29019178ddf0d49b
Signed-off-by: Kostas Christidis <[email protected]>
Copy file name to clipboardexpand all lines: bddtests/features/orderer.feature
+33-30
Original file line number
Diff line number
Diff line change
@@ -15,29 +15,30 @@ Feature: Orderer
15
15
And I wait "<BootTime>" seconds
16
16
And user "binhn" is an authorized user of the ordering service
17
17
When user "binhn" broadcasts "<NumMsgsToBroadcast>" unique messages on "orderer0"
18
+
And user "binhn" waits "<WaitTime>" seconds
18
19
And user "binhn" connects to deliver function on "orderer0"
19
20
And user "binhn" sends deliver a seek request on "orderer0" with properties:
20
21
| Start | End |
21
22
| 1 | Newest |
22
23
Then user "binhn" should get a delivery from "orderer0" of "<ExpectedBlocks>" blocks with "<NumMsgsToBroadcast>" messages within "<BatchTimeout>" seconds
And user "binhn" is an authorized user of the ordering service
84
86
When user "binhn" broadcasts "<NumMsgsToBroadcast>" unique messages on "orderer0"
87
+
And user "binhn" waits "<WaitTime>" seconds
85
88
And user "binhn" connects to deliver function on "orderer0"
86
89
And user "binhn" sends deliver a seek request on "orderer0" with properties:
87
90
| Start | End |
88
91
| Oldest | 2 |
89
92
Then user "binhn" should get a delivery from "orderer0" of "<ExpectedBlocks>" blocks with "<NumMsgsToBroadcast>" messages within "<BatchTimeout>" seconds
@then(u'user "{enrollId}" should get a delivery from "{composeService}" of "{expectedBlocks}" blocks with "{numMsgsToBroadcast}" messages within "{batchTimeout}" seconds')
0 commit comments