Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
config.defaultManagerType beats env.SWINGSET_WORKER_TYPE
Previously, the priority order of worker-type specification was: * highest: config.vats.NAME.creationOptions.managerType * env.SWINGSET_WORKER_TYPE * lowest: config.defaultManagerType The `yarn test:xs` command uses `SWINGSET_WORKER_TYPE=xs-worker` to use an xsnap worker on any test that doesn't care to be more specific. However, for a test to express a stronger preference (e.g. because it looks at snapshots, transcript entries, or metering data), it would have to use the per-vat `creationOptions` control, which is inconvenient ot specify for every vat. Also, this control is only available for static vats: all dynamic vats would use `env.SWINGSET_WORKER_TYPE`, followed by `config.defaultManagerType`. With this change, we make the environment variable the lowest-priority control: * highest: config.vats.NAME.creationOptions.managerType * config.defaultManagerType * lowest: env.SWINGSET_WORKER_TYPE Tests which need all vats to use a 'local' worker, even under `yarn test:xs`, can then use `config: { defaultManagerType: 'local }` without fear of being overridden by the yarn environment. Tests which do not care should continue to omit `defaultManagerType`, allowing `yarn test` or `yarn test:xs` to choose for them.
- Loading branch information