mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-10-20 17:01:24 -07:00
test(launcher): allow Windows bootstrap integration startup time
Cold and cached launches each have a 15-second command timeout. Give the integration test time for both launches and executable copies instead of the default five-second budget on hosted Windows runners.
This commit is contained in:
1 file changed
+14
-3
@@ -68,7 +68,11 @@ test('preparation failures keep their exit code and never continue to the launch
|
||||
assert.match(content, /set "ELECTRON_RUN_AS_NODE="/);
|
||||
});
|
||||
|
||||
test('Windows bootstrap prepares once and forwards metacharacter arguments', async (t) => {
|
||||
// Cold and cached launches each allow 15 seconds, plus executable copies during setup.
|
||||
test(
|
||||
'Windows bootstrap prepares once and forwards metacharacter arguments',
|
||||
{ timeout: 45_000 },
|
||||
async (t) => {
|
||||
if (process.platform !== 'win32') return;
|
||||
|
||||
const root = workspace(t);
|
||||
@@ -79,7 +83,13 @@ test('Windows bootstrap prepares once and forwards metacharacter arguments', asy
|
||||
const localAppData = path.join(root, 'Local App Data');
|
||||
const bootstrapPath = path.join(root, 'subminer.cmd');
|
||||
const version = '1.2.3-test';
|
||||
const cachedBunPath = path.join(localAppData, 'SubMiner', 'launcher-runtime', version, 'bun.exe');
|
||||
const cachedBunPath = path.join(
|
||||
localAppData,
|
||||
'SubMiner',
|
||||
'launcher-runtime',
|
||||
version,
|
||||
'bun.exe',
|
||||
);
|
||||
fs.mkdirSync(launcherDirectory, { recursive: true });
|
||||
fs.copyFileSync(process.execPath, appPath);
|
||||
fs.writeFileSync(path.join(launcherDirectory, 'version'), version);
|
||||
@@ -125,4 +135,5 @@ test('Windows bootstrap prepares once and forwards metacharacter arguments', asy
|
||||
assert.equal(second.exitCode, 0, second.stderr);
|
||||
const secondPayload: unknown = JSON.parse(second.stdout);
|
||||
assert.deepEqual(secondPayload, firstPayload);
|
||||
});
|
||||
},
|
||||
);
|
||||
Reference in new issue
Block a user