Bug Description
The tests in betting_tests.cpp make extensive use of the macros near the top of the file that set up a canned test scenario so that individual test cases can test various subsequent operations within that canned scenario.
Unfortunately, these macros are improperly written leading to abuse of RAM and spurious test failures. The macros, over the course of several blocks, create several objects and store references to these objects for later use. This is not permitted: Graphene object references are invalidated at each block, so it is not valid to keep a reference (or pointer) across block boundaries. Instead, keep the ID, and look up the object by ID after each block.
These macros (and the tests) must be rewritten to store IDs rather than references.
Impacts
Describe which portion(s) of Peerplays may be impacted by this bug. Please tick at least one box.
PBSA / Developer tasks
Bug Description
The tests in
betting_tests.cppmake extensive use of the macros near the top of the file that set up a canned test scenario so that individual test cases can test various subsequent operations within that canned scenario.Unfortunately, these macros are improperly written leading to abuse of RAM and spurious test failures. The macros, over the course of several blocks, create several objects and store references to these objects for later use. This is not permitted: Graphene object references are invalidated at each block, so it is not valid to keep a reference (or pointer) across block boundaries. Instead, keep the ID, and look up the object by ID after each block.
These macros (and the tests) must be rewritten to store IDs rather than references.
Impacts
Describe which portion(s) of Peerplays may be impacted by this bug. Please tick at least one box.
PBSA / Developer tasks