From 5b16dd406d82480518d0ba36f73549e47d5be29c Mon Sep 17 00:00:00 2001 From: gilbysunil14 Date: Thu, 12 Dec 2024 17:01:54 +0530 Subject: [PATCH] delay to start language server --- src/test/GradleSingleModJakartaLSTest.ts | 5 +++-- .../gradle/liberty/web/app/SystemResource.java | 16 ---------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/src/test/GradleSingleModJakartaLSTest.ts b/src/test/GradleSingleModJakartaLSTest.ts index 851480af..e482a847 100644 --- a/src/test/GradleSingleModJakartaLSTest.ts +++ b/src/test/GradleSingleModJakartaLSTest.ts @@ -8,15 +8,16 @@ describe('LSP4Jakarta LS test for snippet test', () => { let editor: TextEditor; it('check if correct code is inserted when rest_class snippet is triggered', async() => { - await VSBrowser.instance.openResources(path.join(utils.getGradleProjectPath(), "src", "main", "java", "test", "gradle", "liberty", "web", "app", "HelloServlet.java")); + await VSBrowser.instance.openResources(path.join(utils.getGradleProjectPath(), "src", "main", "java", "test", "gradle", "liberty", "web", "app", "SystemResource.java")); - editor = await new EditorView().openEditor('HelloServlet.java') as TextEditor; + editor = await new EditorView().openEditor('SystemResource.java') as TextEditor; const textPressent = await editor.getText(); if(textPressent.length > 0){ await editor.clearText(); } + await utils.delay(9000); await editor.typeText("rest"); await utils.delay(6000); diff --git a/src/test/resources/gradle/liberty.gradle.test.wrapper.app/src/main/java/test/gradle/liberty/web/app/SystemResource.java b/src/test/resources/gradle/liberty.gradle.test.wrapper.app/src/main/java/test/gradle/liberty/web/app/SystemResource.java index a52f8513..e69de29b 100644 --- a/src/test/resources/gradle/liberty.gradle.test.wrapper.app/src/main/java/test/gradle/liberty/web/app/SystemResource.java +++ b/src/test/resources/gradle/liberty.gradle.test.wrapper.app/src/main/java/test/gradle/liberty/web/app/SystemResource.java @@ -1,16 +0,0 @@ -package test.gradle.liberty.web.app; - -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.core.MediaType; - -@Path("/path") -public class SystemResource { - - @GET - @Produces(MediaType.TEXT_PLAIN) - public String methodname() { - return "hello"; - } -} \ No newline at end of file