Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify we have tests that ensure the hashCode function outputs never change. #6581

Closed
nickpoorman opened this issue May 12, 2023 · 3 comments · Fixed by #6647
Closed

Verify we have tests that ensure the hashCode function outputs never change. #6581

nickpoorman opened this issue May 12, 2023 · 3 comments · Fixed by #6647
Assignees
Milestone

Comments

@nickpoorman
Copy link
Contributor

Per the incident, write test to ensure the output of this function doesn't change: https://github.com/hashgraph/hedera-services/pull/5968/files#diff-5cb4fe4feeb3706107fbe96b51767faa909d214b0ce57c41308eb1d835337792R345

@nickpoorman nickpoorman added this to the v0.39 milestone May 12, 2023
@nickpoorman
Copy link
Contributor Author

@nickpoorman nickpoorman self-assigned this May 17, 2023
@david-bakin-sl
Copy link
Member

Suggestion: Invent a new annotation, e.g., @ContractInvariant or @ServicesInvariant that would annotate tests, such as the one proposed here, and other similar ones, to indicate that they must never be changed.

Advantages over a simple comment would be that you could then have a script that would be run each release tag that confirmed that the files that had a test annotated this way didn't change (i.e., had no new commits). Thus it would enforce the meaning more than a comment would. (If you remembered to run the script.) (Such annotated tests would need to be isolated in their own test class away from unannotated tests.)

@nickpoorman
Copy link
Contributor Author

Added your suggestion @david-bakin-sl to the list of items we should tackle as part of testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants