Skip to content

Commit

Permalink
fix: make test-activityhash.. use xs-worker
Browse files Browse the repository at this point in the history
I'm seeing CI failures under Node-18 in this test, presumeably because
we get GC variation between the first run and the replay. Super
annoying, and not germane to what this test is supposed to be
executing. The `test.serial` wrapper wasn't enough to fix it, so I've
just switched the test to only use xs-worker.

refs #3240
  • Loading branch information
warner committed Jan 20, 2023
1 parent 886528c commit c6ecf28
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions packages/SwingSet/test/test-activityhash-vs-start.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ const TimerSrc = new URL(
import.meta.url,
).pathname;

// all tests that are sensitive to GC timing (which means anything that
// exercises transcript replay or looks at activityHash) need to use
// test.serial or config.defaultManagerType='xsnap', until we figure out why
// gcAndFinalize sometimes doesn't work (details in #3240 and #4617)
// all tests that are sensitive to GC timing (which means anything
// that exercises transcript replay or looks at activityHash) need to
// use test.serial or config.defaultManagerType='xs-worker', until we
// figure out why gcAndFinalize sometimes doesn't work (details in
// #3240 and #4617). And even test.serial doesn't seem to be enough.

test.serial('restarting kernel does not change activityhash', async t => {
test('restarting kernel does not change activityhash', async t => {
const sourceSpec = new URL('vat-empty-setup.js', import.meta.url).pathname;
const config = {
defaultManagerType: 'xs-worker',
bootstrap: 'bootstrap',
vats: {
bootstrap: {
Expand Down Expand Up @@ -91,14 +93,14 @@ test.serial('restarting kernel does not change activityhash', async t => {
t.is(c1ah, c2ah);
});

test.serial('comms initialize is deterministic', async t => {
test('comms initialize is deterministic', async t => {
// bug #3726: comms was calling vatstoreGet('initialize') and
// vatstoreSet('meta.o+0') during the first message after process restart,
// which makes it a nondeterministic function of the input events.

const sourceSpec = new URL('vat-activityhash-comms.js', import.meta.url)
.pathname;
const config = {};
const config = { defaultManagerType: 'xs-worker' };
config.bootstrap = 'bootstrap';
config.vats = { bootstrap: { sourceSpec } };
const { kernelStorage: ks1, debug: debug1 } = initSwingStore();
Expand Down

0 comments on commit c6ecf28

Please sign in to comment.