Open
Description
Story Form
As a Block Node Developer/User
I want to have correct test fixtures
So that I can be confident when using them and to be confident about my tests and production logic
Technical Notes
- currently the
SimpleBlockRangeSet
's min/max methods return0
(zero) when the set is empty.- this is erroneous because it does not comply with the ranged set API
- as a result, we have some tests that are erroneous and assert wrong and we also have some tests that produce false positives (we pass the test with a wrong production logic)
- example test with wrong assert: here the server status returns 0 for min/max when the node is empty which is erroneous
- example test with false positive: here the production logic allows for a field to be of value -1, but that is not caught in tests because the
SimpleBlockRangeSet
returns 0 instead of -1 for min/max when the set is empty.
- we need to change the behavior of the
SimpleBlockRangeSet
to correctly comply with the ranged set's API - we need to fix all tests that will break as a result and to modify any production logic that is not correct
- we need to be extra careful here as there could be hidden issues, we need to manually check anywhere this fixture is used, even if nothing breaks when making it correct