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

let's replace the hardcoded number of expected values with calculated in test-measure-file.sh #282

Closed
zaqbez39me opened this issue Apr 17, 2024 · 6 comments

Comments

@zaqbez39me
Copy link
Contributor

The number of expected metrics that should be obtained during measure-file.sh executed is hardcoded right now. This can lead to conflict during adding new metric in repo. For example, two developers will add two more metrics in separate pull requests and eacho of them will increase the counter of metrics by 1. If both pull requests will be accepted we will face with the conflict during the merging with master branch, which is bad. Let's, somehow, make the expected number of metrics calculated to avoid cases mentioned above.

@zaqbez39me
Copy link
Contributor Author

@yegor256 I just found out that this number cannot be easily calculated. However, we can store somewhere the expected number of metrics for each metric script. Is it good idea? If yes, where it is better to store them

@yegor256
Copy link
Owner

yegor256 commented Apr 17, 2024

@zaqbez39me maybe let's just change the test: make it check that the number of metrics found is greater or equal to some fixed number.

@zaqbez39me
Copy link
Contributor Author

@yegor256 ok, but this tolerance may make the the tests unsafe with future changes. Maybe, we should apply greater or equal in separate PR without closing this issue for now?

@yegor256
Copy link
Owner

@zaqbez39me yes, let's do it

@timur-harin
Copy link
Contributor

@yegor256
I think we need to close this issue, because PR merged success

@yegor256
Copy link
Owner

@zaqbez39me we fixed it. If you don't mind, I'm closing

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

No branches or pull requests

3 participants