Skip to content

Commit 2bfa54c

Browse files
committed
ADAP-207: fixed few tests
1 parent 3479593 commit 2bfa54c

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ public JSONObject invoke(String action, Object payload, JSONObject senderIdentit
307307
@Test
308308
public void connectionListener() throws Exception {
309309
final String channelName = "connectionListenerTest";
310-
CountDownLatch latch = new CountDownLatch(2);
310+
CountDownLatch latch = new CountDownLatch(3);
311311
desktopConnection.getChannel(channelName).createAsync().thenAccept(provider -> {
312312
provider.addProviderListener(new ChannelProviderListener() {
313313
@Override
@@ -321,6 +321,15 @@ public void onClientDisconnect(ChannelClientConnectEvent connectionEvent) {
321321
});
322322

323323
desktopConnection.getChannel(channelName).connectAsync().thenAccept(client -> {
324+
client.addChannelListener(new ChannelListener() {
325+
@Override
326+
public void onChannelConnect(ConnectionEvent connectionEvent) {
327+
}
328+
@Override
329+
public void onChannelDisconnect(ConnectionEvent connectionEvent) {
330+
latch.countDown();
331+
}
332+
});
324333
client.disconnect(null);
325334
});
326335
});

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public static void setup() throws Exception {
3535
cfg.setManifestLocation("https://testing-assets.openfin.co/adapters/interop/app.json");
3636
// cfg.setManifestLocation("http://localhost:5555/app.json");
3737
desktopConnection = TestUtils.setupConnection(DESKTOP_UUID, cfg);
38+
Thread.sleep(3000); // give time for the js app to start up and configure everything properly
3839
}
3940

4041
@AfterClass

0 commit comments

Comments
 (0)