Skip to content

Commit

Permalink
review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
warner committed Aug 10, 2024
1 parent 0a54a73 commit f76a341
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
6 changes: 3 additions & 3 deletions packages/SwingSet/src/controller/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -473,11 +473,11 @@ export async function makeSwingsetController(
* be durable. Either call `hostStorage.commit()` immediately
* after calling this, or call `controller.run()` and *then*
* `hostStorage.commit()` as you would normally do in response to
* other IO or timer activity.
* other I/O or timer activity.
*
* The first `controller.run()` after this call will delete all
* the old vat's state at once, unless you use a `runPolicy` to
* rate-limit cleanups.
* the old vat's state at once, unless you use a
* [`runPolicy`](../docs/run-policy.md) to rate-limit cleanups.
*
* @param {VatID} vatID
* @param {SwingSetCapData} reasonCD
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ const testExternalTermination = async (t, defaultManagerType) => {
c.pinVatRoot('bootstrap');
await c.run();

const getVatIDs = () => c.dump().vatTables.map(vt => vt.vatID);

// vat-doomed should now be running. We casually assume the new vat
// has the last ID
const vatIDs = c.dump().vatTables.map(vt => vt.vatID);
const vatIDs = getVatIDs();
const vatID = vatIDs[vatIDs.length - 1];

{
Expand All @@ -52,12 +54,7 @@ const testExternalTermination = async (t, defaultManagerType) => {
c.terminateVat(vatID, kser('doom!'));
await c.run();

t.false(
c
.dump()
.vatTables.map(vt => vt.vatID)
.includes(vatID),
);
t.false(getVatIDs().includes(vatID));

{
// this provokes noise: liveslots logs one RemoteError
Expand Down

0 comments on commit f76a341

Please sign in to comment.