Skip to content

Commit

Permalink
s
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartik Raj committed Mar 14, 2024
1 parent 3e9c170 commit 47ccbd1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export class CondaEnvironmentLocator extends FSWatchingLocator {
}

// eslint-disable-next-line class-methods-use-this
public async *doIterEnvs(_: unknown, useWorkerThreads = false): IPythonEnvsIterator<BasicEnvInfo> {
const conda = await Conda.getConda(undefined, useWorkerThreads);
public async *doIterEnvs(_: unknown): IPythonEnvsIterator<BasicEnvInfo> {
const conda = await Conda.getConda();
if (conda === undefined) {
traceVerbose(`Couldn't locate the conda binary.`);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import { PythonEnvsChangedEvent } from '../../../../../client/pythonEnvironments
import { EXTENSION_ROOT_DIR_FOR_TESTS, TEST_TIMEOUT } from '../../../../constants';
import { traceWarn } from '../../../../../client/logging';
import { TEST_LAYOUT_ROOT } from '../../../common/commonTestConstants';
import { getEnvs } from '../../common';
import { assertBasicEnvsEqual } from '../envTestUtils';
import { PYTHON_VIRTUAL_ENVS_LOCATION } from '../../../../ciConstants';
import { isCI } from '../../../../../client/common/constants';
import * as externalDependencies from '../../../../../client/pythonEnvironments/common/externalDependencies';
Expand Down Expand Up @@ -131,14 +129,4 @@ suite('Conda Env Locator', async () => {

assert.deepEqual(actualEvent!, expectedEvent, 'Unexpected event emitted');
});

test('Worker thread to fetch conda environments is working', async () => {
locator = new CondaEnvironmentLocator();
const items = await getEnvs(locator.doIterEnvs(undefined, false));
const workerItems = await getEnvs(locator.doIterEnvs(undefined, true));
console.log('Number of items Conda locator returned:', items.length);
// Make sure items returned when using worker threads v/s not are the same.
assertBasicEnvsEqual(items, workerItems);
assert(workerItems.length > 0, 'No environments found');
}).timeout(TEST_TIMEOUT * 2);
});

0 comments on commit 47ccbd1

Please sign in to comment.