Skip to content

Commit 45401a0

Browse files
committed
ADAP-207: updated tests for Secure By Default
1 parent 72872b8 commit 45401a0

5 files changed

Lines changed: 16 additions & 3 deletions

File tree

release/junit.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ set RuntimeVersion="stable"
66
set RuntimeVersion="%1"
77
)
88

9-
java -cp lib/hamcrest-core-1.3.jar;lib/hamcrest-library-1.1.jar;lib/jetty-client-9.4.18.v20190429.jar;lib/jetty-http-9.4.18.v20190429.jar;lib/jetty-io-9.4.18.v20190429.jar;lib/jetty-util-9.4.18.v20190429.jar;lib/jetty-xml-9.4.18.v20190429.jar;lib/jna-4.5.1.jar;lib/jna-platform-4.5.1.jar;lib/json-20160810.jar;lib/junit-4.11.jar;lib/log4j-1.2.17.jar;lib/mockito-core-1.9.5.jar;lib/objenesis-1.0.jar;lib/openfin-desktop-java-adapter-9.2.0.jar;lib/openfin-desktop-java-example-9.0.1-tests.jar;lib/slf4j-api-1.7.21.jar;lib/slf4j-jdk14-1.6.1.jar;lib/slf4j-log4j12-1.7.18.jar;lib/TableLayout-20050920.jar;lib/websocket-api-9.4.18.v20190429.jar;lib/websocket-client-9.4.18.v20190429.jar;lib/websocket-common-9.4.18.v20190429.jar -Djava.util.logging.config.file=logging.properties -Dcom.openfin.test.runtime.version=%RuntimeVersion% org.junit.runner.JUnitCore com.openfin.desktop.AllTests
9+
java -cp lib/hamcrest-core-1.3.jar;lib/hamcrest-library-1.1.jar;lib/jetty-client-9.4.18.v20190429.jar;lib/jetty-http-9.4.18.v20190429.jar;lib/jetty-io-9.4.18.v20190429.jar;lib/jetty-util-9.4.18.v20190429.jar;lib/jetty-xml-9.4.18.v20190429.jar;lib/jna-4.5.1.jar;lib/jna-platform-4.5.1.jar;lib/json-20160810.jar;lib/junit-4.11.jar;lib/log4j-1.2.17.jar;lib/mockito-core-1.9.5.jar;lib/objenesis-1.0.jar;lib/openfin-desktop-java-adapter-9.2.0.jar;lib/openfin-desktop-java-example-9.2.1-tests.jar;lib/slf4j-api-1.7.21.jar;lib/slf4j-jdk14-1.6.1.jar;lib/slf4j-log4j12-1.7.18.jar;lib/TableLayout-20050920.jar;lib/websocket-api-9.4.18.v20190429.jar;lib/websocket-client-9.4.18.v20190429.jar;lib/websocket-common-9.4.18.v20190429.jar -Djava.util.logging.config.file=logging.properties -Dcom.openfin.test.runtime.version=%RuntimeVersion% org.junit.runner.JUnitCore com.openfin.desktop.AllTests

release/lib/openfin-desktop-java-example-9.0.1-tests.jar renamed to release/lib/openfin-desktop-java-example-9.2.1-tests.jar

180 KB
Binary file not shown.

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ public static void setup() throws Exception {
4040

4141
@AfterClass
4242
public static void teardown() throws Exception {
43-
OpenFinRuntime runtime = new OpenFinRuntime(desktopConnection);
44-
runtime.exit();
43+
TestUtils.teardownDesktopConnection(desktopConnection);
4544
}
4645

4746
@Test
@@ -154,6 +153,15 @@ public void clientFireIntent() throws Exception {
154153
CompletionStage<Void> fireIntentFuture = desktopConnection.getInterop().connect(BROKER_NANE).thenCompose(client->{
155154
return client.fireIntent(intent);
156155
});
156+
desktopConnection.getInterop().connect(BROKER_NANE).thenCompose(client->{
157+
return client.registerIntentListener("JavaIntent", intentReceived->{
158+
String ticker = intentReceived.getContext().getId().optString("ticker", "");
159+
StringBuilder sb = new StringBuilder(context.getId().getString("ticker"));
160+
}).thenCompose(v -> {
161+
return client.fireIntent(intent);
162+
});
163+
});
164+
157165

158166
fireIntentFuture.toCompletableFuture().get(10, TimeUnit.SECONDS);
159167
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import org.json.JSONObject;
1313
import org.junit.AfterClass;
1414
import org.junit.BeforeClass;
15+
import org.junit.Ignore;
1516
import org.junit.Test;
1617
import org.slf4j.Logger;
1718
import org.slf4j.LoggerFactory;
@@ -398,6 +399,8 @@ public void onError(Ack ack) {
398399
}
399400
}
400401

402+
// this test does not work anymore with Secure By Default in place
403+
@Ignore
401404
@Test
402405
public void startAndTerminateExternalProcess() throws Exception {
403406
CountDownLatch startLatch = new CountDownLatch(1);

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,8 @@ public void onError(Ack ack) {
393393
}
394394
}
395395

396+
// this test does not work anymore with Secure By Default in place
397+
@Ignore
396398
@Test
397399
public void startAndTerminateExternalProcess() throws Exception {
398400
CountDownLatch startLatch = new CountDownLatch(1);

0 commit comments

Comments
 (0)