You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2020/11/20 03:21:18 UTC

[GitHub] [netbeans] JaroslavTulach opened a new pull request #2549: Make sure VSCode extension integration tests are executed

JaroslavTulach opened a new pull request #2549:
URL: https://github.com/apache/netbeans/pull/2549


   Executing some VS Code extension integration tests. The goal of the first test is to find out whether NetBeans Travis gate fails.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] JaroslavTulach merged pull request #2549: Initial VSNetBeans extension integration tests.

Posted by GitBox <gi...@apache.org>.
JaroslavTulach merged pull request #2549:
URL: https://github.com/apache/netbeans/pull/2549


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] JaroslavTulach edited a comment on pull request #2549: Make sure VSCode extension integration tests are executed

Posted by GitBox <gi...@apache.org>.
JaroslavTulach edited a comment on pull request #2549:
URL: https://github.com/apache/netbeans/pull/2549#issuecomment-730916273


   Great the [first run failed](https://travis-ci.org/github/apache/netbeans/jobs/744801153) with:
   ```
        [exec] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
        [exec]     ✓ Sample test
        [exec] 
        [exec]     1) Failing test
        [exec] 
        [exec]     2) Extension test
        [exec] 
        [exec]   1 passing (39ms)
        [exec] 
        [exec]   2 failing
        [exec] 
        [exec]   1) Extension Test Suite
        [exec]        Failing test:
        [exec] 
        [exec]       AssertionError [ERR_ASSERTION]: -1 == 0
        [exec]       + expected - actual
        [exec] 
        [exec]       --1
        [exec]       +0
        [exec]       
        [exec]     at Context.<anonymous> (out/test/suite/extension.test.js:23:16)
        [exec]     at processImmediate (internal/timers.js:439:21)
        [exec] 
        [exec] 
        [exec]   2) Extension Test Suite
        [exec]        Extension test:
        [exec]      AssertionError [ERR_ASSERTION]: Apache NetBeans Extension is present
        [exec]     at /home/travis/build/apache/netbeans/java/java.lsp.server/vscode/out/test/suite/extension.test.js:27:16
        [exec]     at Generator.next (<anonymous>)
        [exec]     at /home/travis/build/apache/netbeans/java/java.lsp.server/vscode/out/test/suite/extension.test.js:8:71
        [exec]     at new Promise (<anonymous>)
        [exec]     at __awaiter (out/test/suite/extension.test.js:4:12)
        [exec]     at Context.<anonymous> (out/test/suite/extension.test.js:25:34)
        [exec]     at processImmediate (internal/timers.js:439:21)
        [exec] 
   BUILD FAILED
   ```
   
   E.g. we can test the extension TypeScript code.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] JaroslavTulach commented on pull request #2549: Initial VSNetBeans extension integration tests.

Posted by GitBox <gi...@apache.org>.
JaroslavTulach commented on pull request #2549:
URL: https://github.com/apache/netbeans/pull/2549#issuecomment-733146523


   > Great job with the client Promise !
   
   Thanks. My dream is that we will be able to hide the whole state management behind a single `Promise<NbLanguageClient>` that will hold `nbProcess` and other information. But let's leave that for another PR.
   
   Let this one focus on the _Mocha magic_ and integrate it!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] sdedic commented on pull request #2549: Initial VSNetBeans extension integration tests.

Posted by GitBox <gi...@apache.org>.
sdedic commented on pull request #2549:
URL: https://github.com/apache/netbeans/pull/2549#issuecomment-733118640


   Great job with the client Promise !
   .... but sadly I don't understand the part with Mocha in `index.ts` at all, so let's wait for a more clever reviewer...


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] JaroslavTulach commented on a change in pull request #2549: Make sure VSCode extension integration tests are executed

Posted by GitBox <gi...@apache.org>.
JaroslavTulach commented on a change in pull request #2549:
URL: https://github.com/apache/netbeans/pull/2549#discussion_r527843020



##########
File path: java/java.lsp.server/vscode/src/test/suite/extension.test.ts
##########
@@ -21,4 +28,56 @@ suite('Extension Test Suite', () => {
 		}
 		assert.ok(cannotReassignVersion, "Cannot reassign value of version");
 	});
+	test("Compile workspace", async () => {
+		let folder: string = assertWorkspace();
+
+		fs.writeFileSync(path.join(folder, 'pom.xml'), `
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.netbeans.demo.vscode.t1</groupId>
+    <artifactId>basicapp</artifactId>
+    <version>1.0</version>
+    <properties>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <maven.compiler.target>1.8</maven.compiler.target>
+    </properties>
+</project>
+		`);
+
+		let pkg = path.join(folder, 'src', 'main', 'java', 'pkg');
+		let mainJava = path.join(pkg, 'Main.java');
+
+		fs.mkdirSync(pkg, { recursive: true });
+		fs.writeFileSync(mainJava, `
+package pkg;
+class Main {
+	public static void main(String... args) {
+		System.out.println("Hello World!");
+	}
+}
+		`);
+
+		vscode.workspace.saveAll();
+
+		let delayPromise = new Promise((r) => setTimeout(r, 20000));
+		vscode.window.showInformationMessage('Invoking compile command');
+		await vscode.commands.executeCommand("java.workspace.compile");

Review comment:
       Can you help, @dbalek? I need to wait for the `java.workspace.compile` task to finish and just using `await` isn't enough.  Instead I have to `setTimeout(_, 20s)` and that isn't pretty at all.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] JaroslavTulach commented on a change in pull request #2549: Make sure VSCode extension integration tests are executed

Posted by GitBox <gi...@apache.org>.
JaroslavTulach commented on a change in pull request #2549:
URL: https://github.com/apache/netbeans/pull/2549#discussion_r527883822



##########
File path: java/java.lsp.server/vscode/src/test/suite/extension.test.ts
##########
@@ -21,4 +28,56 @@ suite('Extension Test Suite', () => {
 		}
 		assert.ok(cannotReassignVersion, "Cannot reassign value of version");
 	});
+	test("Compile workspace", async () => {
+		let folder: string = assertWorkspace();
+
+		fs.writeFileSync(path.join(folder, 'pom.xml'), `
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.netbeans.demo.vscode.t1</groupId>
+    <artifactId>basicapp</artifactId>
+    <version>1.0</version>
+    <properties>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <maven.compiler.target>1.8</maven.compiler.target>
+    </properties>
+</project>
+		`);
+
+		let pkg = path.join(folder, 'src', 'main', 'java', 'pkg');
+		let mainJava = path.join(pkg, 'Main.java');
+
+		fs.mkdirSync(pkg, { recursive: true });
+		fs.writeFileSync(mainJava, `
+package pkg;
+class Main {
+	public static void main(String... args) {
+		System.out.println("Hello World!");
+	}
+}
+		`);
+
+		vscode.workspace.saveAll();
+
+		let delayPromise = new Promise((r) => setTimeout(r, 20000));
+		vscode.window.showInformationMessage('Invoking compile command');
+		await vscode.commands.executeCommand("java.workspace.compile");

Review comment:
       f217836 might be the right answer.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] JaroslavTulach commented on pull request #2549: Make sure VSCode extension integration tests are executed

Posted by GitBox <gi...@apache.org>.
JaroslavTulach commented on pull request #2549:
URL: https://github.com/apache/netbeans/pull/2549#issuecomment-730916273


   Great the [first run failed](https://travis-ci.org/github/apache/netbeans/jobs/744801153) with:
   ```
    [exec] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
   
        [exec]     ✓ Sample test
   
        [exec] 
   
        [exec]     1) Failing test
   
        [exec] 
   
        [exec]     2) Extension test
   
        [exec] 
   
        [exec]   1 passing (39ms)
   
        [exec] 
   
        [exec]   2 failing
   
        [exec] 
   
        [exec]   1) Extension Test Suite
   
        [exec]        Failing test:
   
        [exec] 
   
        [exec]       AssertionError [ERR_ASSERTION]: -1 == 0
   
        [exec]       + expected - actual
   
        [exec] 
   
        [exec]       --1
   
        [exec]       +0
   
        [exec]       
   
        [exec]   	at Context.<anonymous> (out/test/suite/extension.test.js:23:16)
   
        [exec]   	at processImmediate (internal/timers.js:439:21)
   
        [exec] 
   
        [exec] 
   
        [exec]   2) Extension Test Suite
   
        [exec]        Extension test:
   
        [exec]      AssertionError [ERR_ASSERTION]: Apache NetBeans Extension is present
   
        [exec]   	at /home/travis/build/apache/netbeans/java/java.lsp.server/vscode/out/test/suite/extension.test.js:27:16
   
        [exec]   	at Generator.next (<anonymous>)
   
        [exec]   	at /home/travis/build/apache/netbeans/java/java.lsp.server/vscode/out/test/suite/extension.test.js:8:71
   
        [exec]   	at new Promise (<anonymous>)
   
        [exec]   	at __awaiter (out/test/suite/extension.test.js:4:12)
   
        [exec]   	at Context.<anonymous> (out/test/suite/extension.test.js:25:34)
   
        [exec]   	at processImmediate (internal/timers.js:439:21)
   
        [exec] 
   
        [exec] 
   
        [exec] Exit code:   1
   
        [exec] Done
   
        [exec] 
   
        [exec] 
   
        [exec] npm ERR! A complete log of this run can be found in:
   
        [exec] npm ERR!     /home/travis/.npm/_logs/2020-11-20T03_33_05_678Z-debug.log
   
   BUILD FAILED
   ```
   
   E.g. we can test the extension TypeScript code.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists