-
Notifications
You must be signed in to change notification settings - Fork 363
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reset pipelines after pipelines are generated in every unit test (#4325)
When generating pipelines, every table ID is allocated by calling `binding.NextTableID()`. Note that, every time the function is called, its return value (uint8) is increased by 1. After each unit test, if not calling `binding.ResetTableID()` to reset the return value, there is a chance that the return value overflows when function to generate pipelines is called enough times. When overflowing, two consecutive return values are 255 and 0, causing test TestBuildPipeline to fail since 255 is not less than 0 (in TestBuildPipeline, there is an asserting about the table of previous table should be less than that of the current table). Signed-off-by: Hongliang Liu <lhongliang@vmware.com>
- Loading branch information
1 parent
339ed6f
commit e516aca
Showing
3 changed files
with
19 additions
and
2 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
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