Skip to content

Commit

Permalink
log index dir
Browse files Browse the repository at this point in the history
  • Loading branch information
ahtrotta committed Aug 23, 2023
1 parent d9eff32 commit 4b3e473
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions test/integration/scanner/performAsAppMapsAreModified.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ import {
executeWorkspaceOSCommand,
} from '../util';

async function logWatches(): Promise<void> {
const watches = await executeWorkspaceOSCommand('ps -ef | grep -e --watch', ProjectA);
console.log('Watches: ', watches);
// async function logWatches(): Promise<void> {
// const watches = await executeWorkspaceOSCommand('ps -ef | grep -e --watch', ProjectA);
// console.log('Watches: ', watches);
// }

async function logIndexDir(): Promise<void> {
const indexDir = await executeWorkspaceOSCommand(`ls -al ${ExampleAppMapIndexDir}`, ProjectA);
console.log('Index Dir: ', indexDir);
}

describe('Scanner', () => {
Expand Down Expand Up @@ -47,25 +52,25 @@ describe('Scanner', () => {
// `AppMap index dir should be removed`,
// async () => !existsSync(ExampleAppMapIndexDir)
// );
await logWatches();
await logIndexDir();

const appMapPath = relative(ProjectA, ExampleAppMap);
await repeatUntil(
async () => await restoreFile(appMapPath),
`AppMap should be reindexed`,
async () => {
await logWatches();
await logIndexDir();
return existsSync(join(ExampleAppMapIndexDir, 'appmap-findings.json'));
}
);

await logWatches();
await logIndexDir();

await repeatUntil(
async () => await restoreFile(appMapPath),
'No Diagnostics were created for Microposts_controller_can_get_microposts_as_JSON',
async () => {
await logWatches();
await logIndexDir();
waitFor(
'diagnostics to be created',
() => getDiagnosticsForAppMap(ExampleAppMap).length > 0,
Expand All @@ -80,5 +85,6 @@ describe('Scanner', () => {
diagnostic.uri.fsPath,
join(ProjectA, 'app/controllers/microposts_controller.rb')
);
assert(false);
});
});

0 comments on commit 4b3e473

Please sign in to comment.