-
Notifications
You must be signed in to change notification settings - Fork 22
update snapshot count function #216
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
base: main
Are you sure you want to change the base?
update snapshot count function #216
Conversation
- update snapshot count function Fixes eclipse-score#192
License Check Results🚀 The license check job ran with the Bazel command: bazel run //:license-checkStatus: Click to expand output |
2bbfea7 to
f87ae84
Compare
|
The created documentation from the pull request is available at: docu-html |
update tests Fixes eclipse-score#192
9fdf6cf to
b9743e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not modify test logic.
Either expand list of xfails or (better) deal with other issue first #108
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arkjedrz current logic is not correct for scenarios we have like snapshot_max_count = 0 or 3.
so may i ask why we are not allowed to change test logic ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those tests expect snapshot_max_count to be parametrizable, and number of existing snapshots is compared to the number of max number of snapshots allowed.
| "snapshot_max_count": snapshot_max_count, | ||
| }, | ||
| "count": 1, | ||
| "count": snapshot_max_count, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is called TestSnapshotCountFirstFlush. It should always try to perform a single flush operation.
Results shall be as following:
snapshot_countmust always == 1 forsnapshot_max_count>= 1.snapshot_countmust always == 0 forsnapshot_max_count== 0.
This cannot be done correctly without #108 fixed.
| "snapshot_max_count": snapshot_max_count, | ||
| }, | ||
| "count": snapshot_max_count + 1, | ||
| "count": snapshot_max_count, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is called TestSnapshotCountFull and the description states: "Checks that the snapshot count increases with each flush, up to the maximum allowed count.".
This test is to verify that snapshots pool saturates at the point specified by snapshot_max_count. It tries to flush one time more than there are snapshots allowed in the system - that's on purpose.
If You're seeing 2 snapshots were found when snapshot_max_count = 1 - it means that max value was not respected.
Again, this test is not possible to perform due to lack of #108
Signed-off-by: Ahmed Elsaka <[email protected]>
Signed-off-by: Ahmed Elsaka <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those tests expect snapshot_max_count to be parametrizable, and number of existing snapshots is compared to the number of max number of snapshots allowed.
| "snapshot_max_count": snapshot_max_count, | ||
| }, | ||
| "count": 1, | ||
| "count": snapshot_max_count, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is called TestSnapshotCountFirstFlush. It should always try to perform a single flush operation.
Results shall be as following:
snapshot_countmust always == 1 forsnapshot_max_count>= 1.snapshot_countmust always == 0 forsnapshot_max_count== 0.
This cannot be done correctly without #108 fixed.
| "snapshot_max_count": snapshot_max_count, | ||
| }, | ||
| "count": snapshot_max_count + 1, | ||
| "count": snapshot_max_count, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is called TestSnapshotCountFull and the description states: "Checks that the snapshot count increases with each flush, up to the maximum allowed count.".
This test is to verify that snapshots pool saturates at the point specified by snapshot_max_count. It tries to flush one time more than there are snapshots allowed in the system - that's on purpose.
If You're seeing 2 snapshots were found when snapshot_max_count = 1 - it means that max value was not respected.
Again, this test is not possible to perform due to lack of #108
Fixes #192