dbalek commented on code in PR #7979:
URL: https://github.com/apache/netbeans/pull/7979#discussion_r1865843917


##########
java/gradle.test/src/org/netbeans/modules/gradle/test/GradleTestProgressListener.java:
##########
@@ -241,11 +252,38 @@ private void caseFinish(TestFinishEvent evt, 
JvmTestOperationDescriptor op) {
                 }
 
             }
-            runningTests.remove(getTestOpKey(op));
         }
 
     }
 
+    private static String GRADLE_TEST_RUN = "Gradle Test Run :";
+    private static String TEST = ":test";
+
+    private Project getProject(String key) {
+        if (key != null && key.startsWith(GRADLE_TEST_RUN)) {
+            key = key.substring(GRADLE_TEST_RUN.length());
+            if (key.endsWith(TEST)) {
+                key = key.substring(0, key.length() - TEST.length()).trim();
+                if (!key.isEmpty()) {
+                    for (Project containedPrj : 
ProjectUtils.getContainedProjects(project, false)) {
+                        if 
(key.equals(containedPrj.getProjectDirectory().getName())) {
+                            return containedPrj;
+                        }
+                    }
+                }
+            }
+        }
+        return project;
+    }
+
+    private static String getSessionKey(OperationDescriptor op) {
+        String id = "";
+        for (OperationDescriptor descriptor = op; descriptor != null; 
descriptor = descriptor.getParent()) {
+            id = descriptor.getName();

Review Comment:
   IIRC- yes



-- 
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

Reply via email to