Skip to content

Commit 3682f05

Browse files
authored
Merge pull request #1398 from github/aeisenberg/integration-tests-fix
Fix failing integration test
2 parents 0ebff2d + eb5ce02 commit 3682f05

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

extensions/ql-vscode/src/vscode-tests/cli-integration/global.helper.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@ import { DatabaseManager } from '../../databases';
1212

1313
export const DB_URL = 'https://github.com/github/vscode-codeql/files/5586722/simple-db.zip';
1414

15-
process.addListener('unhandledRejection', (reason, p) => {
16-
console.log('Unhandled Rejection at: Promise ', p, ' reason: ', reason);
17-
fail(String(reason));
15+
process.addListener('unhandledRejection', (reason) => {
16+
if (reason instanceof Error && reason.message === 'Canceled') {
17+
console.log('Cancellation requested after the test has ended.');
18+
process.exit(0);
19+
} else {
20+
fail(String(reason));
21+
}
1822
});
1923

2024
// We need to resolve the path, but the final three segments won't exist until later, so we only resolve the

extensions/ql-vscode/src/vscode-tests/cli-integration/queries.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,11 @@ describe('Queries', function() {
157157
});
158158

159159
it('should avoid creating a quick query', async () => {
160+
fs.mkdirpSync(path.dirname(qlpackFile));
160161
fs.writeFileSync(qlpackFile, yaml.dump({
161162
name: 'quick-query',
162163
version: '1.0.0',
163-
libraryPathDependencies: ['codeql-javascript']
164+
libraryPathDependencies: ['codeql/javascript-all']
164165
}));
165166
fs.writeFileSync(qlFile, 'xxx');
166167
await commands.executeCommand('codeQL.quickQuery');

0 commit comments

Comments
 (0)