mbien commented on code in PR #8476:
URL: https://github.com/apache/netbeans/pull/8476#discussion_r2069231492


##########
java/java.editor/test/unit/src/org/netbeans/modules/java/editor/imports/ClipboardHandlerTest.java:
##########
@@ -179,6 +180,19 @@ private void copyAndPaste(String from, final String to, 
String golden, String so
         assertEquals(golden, actual[0]);
     }
 
+    // NbClipboard is asynchronoous - this test has to wait for copy/paste to 
finish
+    private static void syncNbClipboard() {
+        NbClipboard nbclip = Lookup.getDefault().lookup(NbClipboard.class);
+        assertNotNull("active NbClipboard expected", nbclip);
+        try {

Review Comment:
   blocking on the tasks is the most-direct way to sync on the clipboard. The 
method is also used from another test.



-- 
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: notifications-unsubscr...@netbeans.apache.org

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


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

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

Reply via email to