-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-1658] Fix Deliver failures on BDD tests
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 <kostas@christidis.io>
- Loading branch information
1 parent
ba288e1
commit 2c6dbcc
Showing
2 changed files
with
39 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters