summaryrefslogtreecommitdiff
path: root/extension/src/test-suite
diff options
context:
space:
mode:
authorNate Sesti <33237525+sestinj@users.noreply.github.com>2023-08-11 13:47:11 -0700
committerGitHub <noreply@github.com>2023-08-11 13:47:11 -0700
commit49e323bd9312e49e7149c8851d55241b4e24ef18 (patch)
tree41b89dba1c67e479236bdaa86d6606f99381c822 /extension/src/test-suite
parent48ee1334dfd21dbe55cf66f39da1249619103e81 (diff)
parent34f77a7344bc527e0c08dea5820a01748f2f8481 (diff)
downloadsncontinue-49e323bd9312e49e7149c8851d55241b4e24ef18.tar.gz
sncontinue-49e323bd9312e49e7149c8851d55241b4e24ef18.tar.bz2
sncontinue-49e323bd9312e49e7149c8851d55241b4e24ef18.zip
Merge pull request #369 from continuedev/ci-testing
Ci testing
Diffstat (limited to 'extension/src/test-suite')
-rw-r--r--extension/src/test-suite/environmentSetup.test.ts17
1 files changed, 13 insertions, 4 deletions
diff --git a/extension/src/test-suite/environmentSetup.test.ts b/extension/src/test-suite/environmentSetup.test.ts
index 9a478522..d0406340 100644
--- a/extension/src/test-suite/environmentSetup.test.ts
+++ b/extension/src/test-suite/environmentSetup.test.ts
@@ -2,18 +2,27 @@ import { test, describe } from "mocha";
import * as assert from "assert";
import { getContinueServerUrl } from "../bridge";
-import { startContinuePythonServer } from "../activation/environmentSetup";
+import { ideProtocolClient } from "../activation/activate";
import fetch from "node-fetch";
+import fkill from "fkill";
describe("Can start python server", () => {
test("Can start python server in under 10 seconds", async function () {
- this.timeout(17_000);
- await startContinuePythonServer();
+ const allowedTime = 25_000;
+ this.timeout(allowedTime + 10_000);
+ try {
+ fkill(65432, { force: true, silent: true });
+ console.log("Killed existing server");
+ } catch (e) {
+ console.log("No existing server: ", e);
+ }
- await new Promise((resolve) => setTimeout(resolve, 15_000));
+ // If successful, the server is started by the extension while we wait
+ await new Promise((resolve) => setTimeout(resolve, allowedTime));
// Check if server is running
const serverUrl = getContinueServerUrl();
+ console.log("Server URL: ", serverUrl);
const response = await fetch(`${serverUrl}/health`);
assert.equal(response.status, 200);
});