Skip to content

Revisit SimpleBlockRangeSet Test Fixture Implementation #1374

Open
@ata-nas

Description

@ata-nas

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 return 0 (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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Block NodeIssues/PR related to the Block Node.ImprovementCode changes driven by non business requirementsTestsissue related to enhancing the tests

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions