diff --git a/src/callbacks.ts b/src/callbacks.ts index af89236d..4bf17620 100644 --- a/src/callbacks.ts +++ b/src/callbacks.ts @@ -25,10 +25,6 @@ import { removeCoverageDataForEnviro, tempScriptCache, } from "./vcastTestInterface"; -import { - closeConnection, - globalEnviroDataServerActive, -} from "../src-common/vcastServer"; import { updateDisplayedCoverage } from "./coverage"; import { updateExploreDecorations } from "./fileDecorator"; import { updateTestDecorator } from "./editorDecorator"; @@ -152,7 +148,6 @@ export async function loadScriptCallBack( const enviroPath = path.join(path.dirname(scriptPath), enviroName); await updateTestPane(enviroPath); - if (globalEnviroDataServerActive) await closeConnection(enviroPath); // If it's a temporary tst file (from create new test script), we delete it. // Otherwise it's a manually editing of an already existing tst file diff --git a/src/manage/manageSrc/manageCommands.ts b/src/manage/manageSrc/manageCommands.ts index ae7d82d9..a423d290 100644 --- a/src/manage/manageSrc/manageCommands.ts +++ b/src/manage/manageSrc/manageCommands.ts @@ -32,11 +32,6 @@ import { envIsEmbeddedInProject, } from "../../vcastUtilities"; -import { - closeConnection, - globalEnviroDataServerActive, -} from "../../../src-common/vcastServer"; - import { globalProjectDataCache, refreshAllExtensionData, @@ -155,9 +150,6 @@ export async function cleanProjectEnvironment( "--force", ]; - // if we are in server mode, close any existing connection to the environment - if (globalEnviroDataServerActive) await closeConnection(enviroPath); - await executeWithRealTimeEchoWithProgress( manageCommandToUse, manageArgs, @@ -223,9 +215,6 @@ export async function removeTestsuiteFromProject( let progressMessage: string = ""; let projectLocation: string = ""; - // if we are in server mode, close any existing connection to the environment - if (globalEnviroDataServerActive) await closeConnection(enviroPath); - for (const [projectPath, projectData] of globalProjectDataCache) { for (const [cachedEnviroPath, enviroData] of projectData) { // We search for the correct environment in the cache in order to get the project diff --git a/src/testPane.ts b/src/testPane.ts index fe8dee68..35d04e04 100644 --- a/src/testPane.ts +++ b/src/testPane.ts @@ -96,10 +96,6 @@ import { getEnviroNameFromScript, getVcastOptionValues, } from "../src-common/commonUtilities"; -import { - closeConnection, - globalEnviroDataServerActive, -} from "../src-common/vcastServer"; import { addManagedEnvironments, ignoreEnvsInProject, @@ -1570,9 +1566,6 @@ export async function runTests( for (let enviroPath of enviroPathList) { await updateDataForEnvironment(enviroPath); - if (globalEnviroDataServerActive) { - await closeConnection(enviroPath); - } } await updateDisplayedCoverage(); } @@ -1649,7 +1642,6 @@ export async function deleteTests(nodeList: any[]) { const enviroPath = getEnviroPathFromID(enviroNodeID); await updateDataForEnvironment(enviroPath); await updateProjectData(enviroPath); - if (globalEnviroDataServerActive) await closeConnection(enviroPath); } } @@ -1697,7 +1689,6 @@ export async function loadTestScript() { // update the test pane for this environment after the script is loaded // we are reading the data back from the environment with this call updateTestPane(enviroPath); - if (globalEnviroDataServerActive) await closeConnection(enviroPath); // If it's a temporary tst file (from create new test script), we delete it. // Otherwise it's a manually editing of an already existing tst file @@ -2067,7 +2058,6 @@ export async function updateCodedTestCases(editor: any) { } else { vectorMessage("Error refreshing coded tests\n"); } - if (globalEnviroDataServerActive) await closeConnection(enviroPath); } // update the test names and checksum in all cases, rather than checking for diffs again codedTestFileData.testNames = newTestNames; diff --git a/src/vcastAdapter.ts b/src/vcastAdapter.ts index f45921da..8042e2c5 100644 --- a/src/vcastAdapter.ts +++ b/src/vcastAdapter.ts @@ -14,7 +14,6 @@ import { updateProjectData } from "./manage/manageSrc/manageCommands"; import { openMessagePane, vectorMessage } from "./messagePane"; import { - environmentDataCache, getClicastArgsFromTestNode, getClicastArgsFromTestNodeAsList, getEnviroNameFromID, @@ -504,9 +503,6 @@ export async function openVcastFromEnviroNode( const enviroPath = getEnviroPathFromID(enviroNodeID); const enclosingDirectory = path.dirname(enviroPath); - // close any existing clicast connection to this environment - if (globalEnviroDataServerActive) await closeConnection(enviroPath); - // we use spawn directly to control the detached and shell args let vcast = spawn(vcastCommandToUse, vcastArgs, { cwd: enclosingDirectory, @@ -526,16 +522,6 @@ export async function openProjectInVcast( // this returns the environment directory name without any nesting let vcastArgs: string[] = ["-e " + projectName]; - const projectPath = path.join(projectRoot, projectName); - // close any existing clicast connection to this environment - if (globalEnviroDataServerActive) { - for (let envData of environmentDataCache.values()) { - if (envData.projectPath === projectPath) { - await closeConnection(envData.buildDirectory); - } - } - } - // we use spawn directly to control the detached and shell args let vcast = spawn(vcastCommandToUse, vcastArgs, { cwd: projectRoot, @@ -561,10 +547,6 @@ export async function openVcastFromVCEfile(vcePath: string, callback: any) { const enclosingDirectory = path.dirname(vcePath); vectorMessage("Opening vcast for: " + enviroPath); - - // close any existing clicast connection to this environment - if (globalEnviroDataServerActive) await closeConnection(enviroPath); - vectorMessage( `Calling vcast with args: ${vcastCommandToUse} ${vcastArgs.join(" ")}` ); diff --git a/src/vcastTestInterface.ts b/src/vcastTestInterface.ts index bf107ad5..53eb5b54 100644 --- a/src/vcastTestInterface.ts +++ b/src/vcastTestInterface.ts @@ -67,10 +67,6 @@ import { openTestFileAndErrors, testStatus, } from "./vcastUtilities"; -import { - closeConnection, - globalEnviroDataServerActive, -} from "../src-common/vcastServer"; const fs = require("fs"); const path = require("path"); @@ -1080,7 +1076,6 @@ async function commonCodedTestProcessing( } else { openTestFileAndErrors(testNode); } - if (globalEnviroDataServerActive) await closeConnection(enviroPath); } export async function addExistingCodedTestFile(testID: string) {