-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: test recovery procedure when
finally
traps (#4841)
This PR adds a substitution variable `$PRINCIPAL` to `.drun` scripts, encoding a message argument `{ canister_id = $ID }`. Using this information we can invoke the management canister's `start_canister`/`stop_canister` methods and with this we can implement a test for the recovery sequence detailed in #4840, to upgrade even if there are continuations in the futures table, e.g. due to trapping `finally` block. Fixes #4840.
- Loading branch information
Showing
3 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
install $ID try-finally-trap/try-finally-trap.mo "" | ||
ingress $ID show "DIDL\x00\x00" | ||
upgrade $ID try-finally-trap/try-finally-trap.mo "" | ||
ingress $ID show "DIDL\x00\x00" | ||
ingress $ID go "DIDL\x00\x00" | ||
ingress $ID show "DIDL\x00\x00" | ||
upgrade $ID try-finally-trap/try-finally-trap.mo "" | ||
ingress $ID show "DIDL\x00\x00" | ||
ingress aaaaa-aa stop_canister $PRINCIPAL | ||
upgrade $ID try-finally-trap/try-finally-trap.mo "" | ||
ingress aaaaa-aa start_canister $PRINCIPAL | ||
ingress $ID show "DIDL\x00\x00" |