-
Notifications
You must be signed in to change notification settings - Fork 390
chore(canister_logging): update charging cycles tests #9785
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: master
Are you sure you want to change the base?
Changes from 4 commits
5513fa3
a95489c
b7fa5a9
b6bf865
88e2a20
82de728
3e5d17d
2d63418
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -191,7 +191,7 @@ async fn setup( | |
| pic.add_cycles( | ||
| migrated_canister, | ||
| if LOG_MEMORY_STORE_FEATURE_ENABLED { | ||
| 9_200_000 | ||
| 11_200_000 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How was this derived? Just experimentally?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, just experimentally
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we could use the same "trick" as I suggested before (raise the freezing threshold) so that we don't need to compute the number of cycles so precisely. But that's beyond the scope of this PR so I don't insist on doing it right now.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will leave it to @michael-weigelt to decide to follow-up or that or not. |
||
| } else { | ||
| 2_000_000 | ||
| }, | ||
|
|
@@ -227,7 +227,7 @@ async fn setup( | |
| pic.add_cycles( | ||
| replaced_canister, | ||
| if LOG_MEMORY_STORE_FEATURE_ENABLED { | ||
| 9_200_000 | ||
| 11_200_000 | ||
| } else { | ||
| 2_000_000 | ||
| }, | ||
|
|
||
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.
Why "just enough"? It seems like this test only cares about the canister being frozen which can be achieved by setting the freezing threshold to a very high value (
u64::MAX / 2or whatever the system still allows) without computing the initial cycles balance so precisely.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.
good call, I changed the test, thank you!