From c6bca489352220d60fb0bd4f8196590ae4086f70 Mon Sep 17 00:00:00 2001 From: Den1552 Date: Thu, 26 Mar 2026 11:15:28 +0100 Subject: [PATCH 1/4] Removed some close connections --- src/callbacks.ts | 1 - src/manage/manageSrc/manageCommands.ts | 6 ------ src/testPane.ts | 6 ------ src/vcastAdapter.ts | 3 --- src/vcastTestInterface.ts | 1 - 5 files changed, 17 deletions(-) diff --git a/src/callbacks.ts b/src/callbacks.ts index af89236d..243b7337 100644 --- a/src/callbacks.ts +++ b/src/callbacks.ts @@ -152,7 +152,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..c39df174 100644 --- a/src/manage/manageSrc/manageCommands.ts +++ b/src/manage/manageSrc/manageCommands.ts @@ -155,9 +155,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 +220,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..591f2e6d 100644 --- a/src/testPane.ts +++ b/src/testPane.ts @@ -1570,9 +1570,6 @@ export async function runTests( for (let enviroPath of enviroPathList) { await updateDataForEnvironment(enviroPath); - if (globalEnviroDataServerActive) { - await closeConnection(enviroPath); - } } await updateDisplayedCoverage(); } @@ -1649,7 +1646,6 @@ export async function deleteTests(nodeList: any[]) { const enviroPath = getEnviroPathFromID(enviroNodeID); await updateDataForEnvironment(enviroPath); await updateProjectData(enviroPath); - if (globalEnviroDataServerActive) await closeConnection(enviroPath); } } @@ -1697,7 +1693,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 +2062,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..a503de98 100644 --- a/src/vcastAdapter.ts +++ b/src/vcastAdapter.ts @@ -504,9 +504,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, diff --git a/src/vcastTestInterface.ts b/src/vcastTestInterface.ts index bf107ad5..dc386317 100644 --- a/src/vcastTestInterface.ts +++ b/src/vcastTestInterface.ts @@ -1080,7 +1080,6 @@ async function commonCodedTestProcessing( } else { openTestFileAndErrors(testNode); } - if (globalEnviroDataServerActive) await closeConnection(enviroPath); } export async function addExistingCodedTestFile(testID: string) { From 0bbb461916d2845c8cc32401b8e66e112ea5c435 Mon Sep 17 00:00:00 2001 From: Den1552 Date: Thu, 26 Mar 2026 13:02:32 +0100 Subject: [PATCH 2/4] Removed unused imports --- src/callbacks.ts | 4 ---- src/manage/manageSrc/manageCommands.ts | 5 ----- src/testPane.ts | 4 ---- src/vcastTestInterface.ts | 4 ---- 4 files changed, 17 deletions(-) diff --git a/src/callbacks.ts b/src/callbacks.ts index 243b7337..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"; diff --git a/src/manage/manageSrc/manageCommands.ts b/src/manage/manageSrc/manageCommands.ts index c39df174..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, diff --git a/src/testPane.ts b/src/testPane.ts index 591f2e6d..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, diff --git a/src/vcastTestInterface.ts b/src/vcastTestInterface.ts index dc386317..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"); From f25e94dc6bbd007bea19b1a6b3c2e5415f00c623 Mon Sep 17 00:00:00 2001 From: Den1552 Date: Thu, 26 Mar 2026 13:50:13 +0100 Subject: [PATCH 3/4] Removed more close connections --- src/vcastAdapter.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/vcastAdapter.ts b/src/vcastAdapter.ts index a503de98..406e0cdd 100644 --- a/src/vcastAdapter.ts +++ b/src/vcastAdapter.ts @@ -523,16 +523,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, @@ -558,10 +548,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(" ")}` ); From 60102025260343c5dc127060a7a95a9486fc90a8 Mon Sep 17 00:00:00 2001 From: Den1552 Date: Thu, 26 Mar 2026 14:10:24 +0100 Subject: [PATCH 4/4] Removed unused import --- src/vcastAdapter.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vcastAdapter.ts b/src/vcastAdapter.ts index 406e0cdd..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,