Skip to content

Commit

Permalink
test-terminate(-replay): reduce GC sensitivity
Browse files Browse the repository at this point in the history
I saw a test failure here, "historical inaccuracy in replay", which
might have been due to GC happening one way in the original, and a
different way in the replay (when running under Node.js). This feels
like an aspect of #5575, and this test isn't trying to exercise
anything about GC, so I'm just going to set defaultReapInterval to
'never' to inhibit BOYD, which should remove the problem.
  • Loading branch information
warner committed Apr 5, 2023
1 parent 7b9def1 commit 14af542
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ test.serial('replay does not resurrect dead vat', async t => {
const configPath = new URL('swingset-no-zombies.json', import.meta.url)
.pathname;
const config = await loadSwingsetConfigFile(configPath);
config.defaultReapInterval = 'never';

const ss1 = initSwingStore();
{
Expand Down
7 changes: 7 additions & 0 deletions packages/SwingSet/test/vat-admin/terminate/test-terminate.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ async function doTerminateNonCritical(
const configPath = new URL('swingset-terminate.json', import.meta.url)
.pathname;
const config = await loadSwingsetConfigFile(configPath);
config.defaultReapInterval = 'never';
const kernelStorage = initSwingStore().kernelStorage;
const controller = await buildVatController(config, [], {
...t.context.data,
Expand Down Expand Up @@ -104,6 +105,7 @@ async function doTerminateCritical(
const configPath = new URL('swingset-terminate.json', import.meta.url)
.pathname;
const config = await loadSwingsetConfigFile(configPath);
config.defaultReapInterval = 'never';
const kernelStorage = initSwingStore().kernelStorage;
const controller = await buildVatController(config, [], {
...t.context.data,
Expand Down Expand Up @@ -374,6 +376,7 @@ test.serial('exit with presence', async t => {
const configPath = new URL('swingset-die-with-presence.json', import.meta.url)
.pathname;
const config = await loadSwingsetConfigFile(configPath);
config.defaultReapInterval = 'never';
const controller = await buildVatController(config, [], t.context.data);
t.teardown(controller.shutdown);
await controller.run();
Expand All @@ -389,6 +392,7 @@ test.serial('dispatches to the dead do not harm kernel', async t => {
const configPath = new URL('swingset-speak-to-dead.json', import.meta.url)
.pathname;
const config = await loadSwingsetConfigFile(configPath);
config.defaultReapInterval = 'never';

const ss1 = initSwingStore();
{
Expand Down Expand Up @@ -432,6 +436,7 @@ test.serial('invalid criticalVatKey causes vat creation to fail', async t => {
const configPath = new URL('swingset-bad-vat-key.json', import.meta.url)
.pathname;
const config = await loadSwingsetConfigFile(configPath);
config.defaultReapInterval = 'never';
const controller = await buildVatController(config, [], t.context.data);
t.teardown(controller.shutdown);
await t.throwsAsync(() => controller.run(), {
Expand All @@ -443,6 +448,7 @@ test.serial('dead vat state removed', async t => {
const configPath = new URL('swingset-die-cleanly.json', import.meta.url)
.pathname;
const config = await loadSwingsetConfigFile(configPath);
config.defaultReapInterval = 'never';
const { kernelStorage, debug } = initSwingStore();

const controller = await buildVatController(config, [], {
Expand Down Expand Up @@ -480,6 +486,7 @@ test.serial('terminate with presence', async t => {
import.meta.url,
).pathname;
const config = await loadSwingsetConfigFile(configPath);
config.defaultReapInterval = 'never';
const controller = await buildVatController(config, [], t.context.data);
t.teardown(controller.shutdown);
await controller.run();
Expand Down

0 comments on commit 14af542

Please sign in to comment.