Skip to content

Commit 4bbd772

Browse files
committed
ADAP-83: fixed noficationTest for Runtime 6.0
1 parent 1a6563c commit 4bbd772

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ public static void setup() throws Exception {
3232
logger.debug("starting");
3333
desktopConnection = TestUtils.setupConnection(DESKTOP_UUID);
3434

35+
// for Runtime 6.0+, needs to start at least one app for notifications to work
36+
ApplicationOptions options = TestUtils.getAppOptions(null);
37+
Application application = TestUtils.runApplication(options, desktopConnection);
38+
3539
logger.info("Waiting for notification center to be ready");
3640
// @TODO currently there is no way to know Notification center is ready, so we just sleep here
3741
// @TODO we will fix notification center to generate an event when it finishes initialization and is ready to process requests

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,13 @@ public static DesktopConnection setupConnection(String connectionUuid, String rd
109109
}
110110

111111
DesktopConnection desktopConnection = new DesktopConnection(connectionUuid);
112-
desktopConnection.setAdditionalRuntimeArguments(" --v=1 --no-sandbox "); // turn on Chromium debug log
113-
desktopConnection.setDevToolsPort(9090);
114-
desktopConnection.setRdmUrl(rdmUrl);
115-
desktopConnection.setRuntimeAssetsUrl(assetsUrl);
116-
desktopConnection.connectToVersion(runtimeVersion, new DesktopStateListener() {
112+
RuntimeConfiguration configuration = new RuntimeConfiguration();
113+
configuration.setRuntimeVersion(runtimeVersion);
114+
configuration.setAdditionalRuntimeArguments(" --v=1 --no-sandbox "); // turn on Chromium debug log
115+
configuration.setDevToolsPort(9090);
116+
configuration.setRdmURL(rdmUrl);
117+
configuration.setRuntimeAssetURL(assetsUrl);
118+
desktopConnection.connect(configuration, new DesktopStateListener() {
117119
@Override
118120
public void onReady() {
119121
logger.info("Connected to OpenFin runtime");

0 commit comments

Comments
 (0)