Skip to content

Commit

Permalink
fix(swingset): test-marshal.js: delete leftover+slow kernel creation
Browse files Browse the repository at this point in the history
For some reason, most of the deserialization tests in test-marshal.js have
been creating a full SwingSet controller and then throwing it away. This is
an ancient leftover from the PlaygroundVat days, and removing it reduces the
test's runtime from about 20 seconds to just 1.
  • Loading branch information
warner committed Aug 13, 2021
1 parent 160afe0 commit c621af7
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions packages/SwingSet/test/test-marshal.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import { WeakRef, FinalizationRegistry } from '../src/weakref.js';
import { makeDummyMeterControl } from '../src/kernel/dummyMeterControl.js';
import { makeMarshaller } from '../src/kernel/liveSlots.js';

import { buildVatController } from '../src/index.js';

const gcTools = harden({
WeakRef,
FinalizationRegistry,
Expand All @@ -23,12 +21,6 @@ function makeUnmeteredMarshaller(syscall) {
return { m, unmeteredUnserialize };
}

async function prep() {
const config = {};
const controller = await buildVatController(config);
await controller.run();
}

test('serialize exports', t => {
const { m } = makeMarshaller(undefined, gcTools);
const ser = m.serialize;
Expand Down Expand Up @@ -56,7 +48,6 @@ test('serialize exports', t => {
});

test('deserialize imports', async t => {
await prep();
const { unmeteredUnserialize } = makeUnmeteredMarshaller(undefined);
const a = unmeteredUnserialize({
body: '{"@qclass":"slot","index":0}',
Expand Down Expand Up @@ -93,7 +84,6 @@ test('deserialize exports', t => {
});

test('serialize imports', async t => {
await prep();
const { m, unmeteredUnserialize } = makeUnmeteredMarshaller(undefined);
const a = unmeteredUnserialize({
body: '{"@qclass":"slot","index":0}',
Expand Down Expand Up @@ -144,7 +134,6 @@ test('serialize promise', async t => {
});

test('unserialize promise', async t => {
await prep();
const log = [];
const syscall = {
subscribe(promiseID) {
Expand Down

0 comments on commit c621af7

Please sign in to comment.