File tree Expand file tree Collapse file tree
src/test/java/com/openfin/desktop Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -294,5 +294,24 @@ public void wildCardTopic() throws Exception {
294294 assertEquals (latch .getCount (), 0 );
295295 }
296296
297+ @ Test
298+ public void wildCardTopicSelf () throws Exception {
299+
300+ CountDownLatch latch = new CountDownLatch (1 );
301+ BusListener busListener = (sourceUuid , receivingTopic , payload ) -> {
302+ logger .debug (String .format ("Receiving %s" , payload .toString ()));
303+ if (receivingTopic .equals ("wildcard-self" )) {
304+ latch .countDown ();
305+ }
306+ };
307+ subscribeToTopic ("*" , "*" , busListener );
308+
309+ JSONObject msg = new JSONObject ();
310+ msg .put ("name" , "wildCardTopicSelf" );
311+ desktopConnection .getInterApplicationBus ().publish ("wildcard-self" , msg );
312+
313+ latch .await (5 , TimeUnit .SECONDS );
314+ assertEquals (latch .getCount (), 0 );
315+ }
297316
298317}
You can’t perform that action at this time.
0 commit comments