petrovic-d commented on code in PR #7979:
URL: https://github.com/apache/netbeans/pull/7979#discussion_r1889958127
##########
java/java.lsp.server/vscode/src/testAdapter.ts:
##########
@@ -63,53 +87,122 @@ export class NbTestAdapter {
for (let item of include) {
if (item.uri) {
this.set(item, 'enqueued');
+ item.parent?.children.forEach(child => {
+ if (child.id?.includes(item.id)) {
+ this.set(child, 'enqueued');
+ }
+ })
const idx = item.id.indexOf(':');
+ const nestedClassIdx = item.id.indexOf('$');
+ let nestedClass: string | undefined;
+ if (nestedClassIdx > 0) {
+ nestedClass = idx < 0
+ ? item.id.slice(nestedClassIdx + 1)
+ : item.id.substring(nestedClassIdx + 1, idx);
+ }
if (!cancellation.isCancellationRequested) {
- await
commands.executeCommand(request.profile?.kind === TestRunProfileKind.Debug ?
COMMAND_PREFIX + '.debug.single' : COMMAND_PREFIX + '.run.single',
item.uri.toString(), idx < 0 ? undefined : item.id.slice(idx + 1));
+ await
commands.executeCommand(request.profile?.kind === TestRunProfileKind.Debug ?
COMMAND_PREFIX + '.debug.single' : COMMAND_PREFIX + '.run.single',
item.uri.toString(), idx < 0 ? undefined : item.id.slice(idx + 1), nestedClass);
}
}
}
} else {
this.testController.items.forEach(item => this.set(item,
'enqueued'));
for (let workspaceFolder of workspace.workspaceFolders || []) {
if (!cancellation.isCancellationRequested) {
- await commands.executeCommand(request.profile?.kind
=== TestRunProfileKind.Debug ? COMMAND_PREFIX + '.debug.test': COMMAND_PREFIX +
'.run.test', workspaceFolder.uri.toString());
+ if (testInParallel) {
+ await commands.executeCommand(COMMAND_PREFIX +
'.run.test', workspaceFolder.uri.toString(), undefined, undefined, undefined,
true, projects);
+ } else {
+ await
commands.executeCommand(request.profile?.kind === TestRunProfileKind.Debug ?
COMMAND_PREFIX + '.debug.test': COMMAND_PREFIX + '.run.test',
workspaceFolder.uri.toString());
+ }
}
}
}
if (this.started) {
this.itemsToRun.forEach(item => this.set(item, 'skipped'));
+ }
+ // TBD - message
Review Comment:
Yes. This case will happen when the build fails - tests are not even
started. We need to decide what will be the message, or to somehow parse output
from the console
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists