Skip to content

Commit

Permalink
delay to start language server
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbysunil14 committed Dec 12, 2024
1 parent 49153cc commit 5b16dd4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
5 changes: 3 additions & 2 deletions src/test/GradleSingleModJakartaLSTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
@@ -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";
}
}

0 comments on commit 5b16dd4

Please sign in to comment.