Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/test/globalSetup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
/**
* Before/After hooks for all "unit" tests
*/
import * as vscode from 'vscode'
import * as assert from 'assert'
import { appendFileSync, mkdirpSync } from 'fs-extra'
import { join } from 'path'
Expand All @@ -20,7 +19,6 @@ import { TelemetryPublisher } from '../shared/telemetry/telemetryPublisher'
import { FakeExtensionContext } from './fakeExtensionContext'
import { TestLogger } from './testLogger'
import { FakeAwsContext } from './utilities/fakeAwsContext'
import { VSCODE_EXTENSION_ID } from '../shared/extensions'

const testReportDir = join(__dirname, '../../../.test-reports')
const testLogOutput = join(testReportDir, 'testLog.log')
Expand All @@ -45,9 +43,6 @@ before(async () => {
}
const service = new DefaultTelemetryService(mockContext, mockAws, mockPublisher)
ext.telemetry = service

// Warm up vscode before tests run
await vscode.extensions.getExtension(VSCODE_EXTENSION_ID.awstoolkit)!.activate()
})

beforeEach(async function() {
Expand Down
6 changes: 6 additions & 0 deletions src/test/shared/codelens/localLambdaRunner.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ import { DebugConfiguration } from '../../../lambda/local/debugConfiguration'
import * as localLambdaRunner from '../../../shared/codelens/localLambdaRunner'
import * as fsUtils from '../../../shared/filesystemUtilities'
import { ChildProcessResult } from '../../../shared/utilities/childProcess'
import { ExtensionDisposableFiles } from '../../../shared/utilities/disposableFiles'
import { FakeExtensionContext } from '../../fakeExtensionContext'
import { FakeChannelLogger } from '../fakeChannelLogger'
import { assertRejects } from '../utilities/assertUtils'

describe('localLambdaRunner', async () => {
let tempDir: string
before(async () => {
await ExtensionDisposableFiles.initialize(new FakeExtensionContext())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this conflict with the call in src/shared/utilities/disposableFiles.ts ? Since the tests are running in the same process and ExtensionDisposableFiles.initialize only allows one instance, it could cause an exception: #1132 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like an oversight in how the test was initially set up.
The ExtensionDisposableFiles instance should be reset (to null) after this test suite. ExtensionDisposableFiles would need to have a method added to support this.

})

beforeEach(async () => {
tempDir = await fsUtils.makeTemporaryToolkitFolder()
})
Expand Down