Skip to content

Commit

Permalink
chore(integration-test): update comments and variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
LuqiPan committed Mar 12, 2024
1 parent 93435bc commit 794d8fe
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions packages/agoric-cli/tools/getting-started.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export const gettingStartedWorkflowTest = async (t, options = {}) => {
const { AGORIC_CMD = JSON.stringify(defaultAgoricCmd()) } = process.env;
const agoricCmd = JSON.parse(AGORIC_CMD);
function myMain(args, opts = {}) {
// console.error('running agoric-cli', ...extraArgs, ...args);
return pspawnStdout(agoricCmd[0], [...agoricCmd.slice(1), ...args], {
stdio: ['ignore', 'pipe', 'inherit'],
env: { ...process.env, DEBUG: 'agoric:debug' },
Expand Down Expand Up @@ -116,8 +115,8 @@ export const gettingStartedWorkflowTest = async (t, options = {}) => {
// yarn start:docker
t.is(await yarn(['start:docker']), 0, 'yarn start:docker works');

// TODO: use abci_info endpoint to get block height
// sleep for 180 seconds for now
// XXX: use abci_info endpoint to get block height
// sleep to let contract start
await new Promise(resolve => setTimeout(resolve, TIMEOUT_SECONDS));

// ==============
Expand All @@ -126,8 +125,8 @@ export const gettingStartedWorkflowTest = async (t, options = {}) => {

// ==============
// yarn start:ui
const uiStartP = yarn(['start:ui']);
finalizers.push(() => pkill(uiStartP.childProcess, 'SIGINT'));
const startUiP = yarn(['start:ui']);
finalizers.push(() => pkill(startUiP.childProcess, 'SIGINT'));
const uiListening = makePromiseKit();
let retries = 0;
const ival = setInterval(() => {
Expand Down Expand Up @@ -158,7 +157,7 @@ export const gettingStartedWorkflowTest = async (t, options = {}) => {
}
}, 3000);
t.is(
await Promise.race([uiStartP, uiListening.promise]),
await Promise.race([startUiP, uiListening.promise]),
'listening',
`yarn start:ui succeeded`,
);
Expand Down

0 comments on commit 794d8fe

Please sign in to comment.