summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-08-14 13:04:18 -0700
committerNate Sesti <sestinj@gmail.com>2023-08-14 13:04:18 -0700
commit52f4273be3d20c983cd0d62bc4d4f4d945b72b00 (patch)
tree54fddecea1399ef77d97d0d08fb35ae309046174
parent1c288f7749747c6b1908ae16c977f80e5597d2ca (diff)
downloadsncontinue-52f4273be3d20c983cd0d62bc4d4f4d945b72b00.tar.gz
sncontinue-52f4273be3d20c983cd0d62bc4d4f4d945b72b00.tar.bz2
sncontinue-52f4273be3d20c983cd0d62bc4d4f4d945b72b00.zip
editing test again
-rw-r--r--extension/src/activation/environmentSetup.ts4
-rw-r--r--extension/src/test-suite/environmentSetup.test.ts6
2 files changed, 8 insertions, 2 deletions
diff --git a/extension/src/activation/environmentSetup.ts b/extension/src/activation/environmentSetup.ts
index e45df05e..f64f13bf 100644
--- a/extension/src/activation/environmentSetup.ts
+++ b/extension/src/activation/environmentSetup.ts
@@ -146,7 +146,7 @@ export async function downloadFromS3(
}
}
-export async function startContinuePythonServer() {
+export async function startContinuePythonServer(redownload: boolean = true) {
// Check vscode settings
const serverUrl = getContinueServerUrl();
if (serverUrl !== "http://localhost:65432") {
@@ -191,7 +191,7 @@ export async function startContinuePythonServer() {
}
}
- if (shouldDownload) {
+ if (shouldDownload && redownload) {
await vscode.window.withProgress(
{
location: vscode.ProgressLocation.Notification,
diff --git a/extension/src/test-suite/environmentSetup.test.ts b/extension/src/test-suite/environmentSetup.test.ts
index 59d9f6bb..9947894a 100644
--- a/extension/src/test-suite/environmentSetup.test.ts
+++ b/extension/src/test-suite/environmentSetup.test.ts
@@ -2,7 +2,9 @@ import { test, describe } from "mocha";
import * as assert from "assert";
import { getContinueServerUrl } from "../bridge";
+import { startContinuePythonServer } from "../activation/environmentSetup";
import fetch from "node-fetch";
+import fkill from "fkill";
describe("Can start python server", () => {
test("Can start python server in under 35 seconds", async function () {
@@ -15,6 +17,10 @@ describe("Can start python server", () => {
// console.log("No existing server: ", e);
// }
+ console.log("Starting server in test...");
+ await startContinuePythonServer(false);
+ console.log("Server started.");
+
// If successful, the server is started by the extension while we wait
await new Promise((resolve) => setTimeout(resolve, allowedTime));