Skip to content

Commit b3ae730

Browse files
committed
RUN-1844: add test case for wildcard topic
1 parent 42c5407 commit b3ae730

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

src/test/java/com/openfin/desktop/InterApplicationBusTest.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)