Skip to content

Commit

Permalink
Add build.yml process try Upload failure artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
vharseko committed Mar 12, 2024
1 parent 6b2270a commit f744a3d
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import java.io.File;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.concurrent.TimeUnit;

import org.forgerock.openicf.framework.AsyncConnectorInfoManagerTestBase;
import org.forgerock.openicf.framework.ConnectorFramework;
Expand Down Expand Up @@ -165,8 +166,6 @@ public void testConnectorBundleRange() throws Exception {

manager.addConnectorBundle(bundle10);

Assert.assertTrue(keyRangePromise.isDone());

keyRangePromise.thenOnResult(new ResultHandler<ConnectorInfo>() {
public void handleResult(ConnectorInfo result) {
Assert.assertEquals(result.getConnectorKey().getBundleVersion(), "1.0.0.0");
Expand All @@ -177,13 +176,15 @@ public void handleException(RuntimeException error) {
}
});

keyRangePromise.getOrThrowUninterruptibly(10, TimeUnit.SECONDS);
Assert.assertTrue(keyRangePromise.isDone());

keyRangePromise =
manager.findConnectorInfoAsync(ConnectorKeyRange.newBuilder().setBundleName(
"testbundlev2").setConnectorName(
"org.identityconnectors.testconnector.TstConnector").setBundleVersion(
"[1.0,2.0)").build());

Assert.assertTrue(keyRangePromise.isDone());

keyRangePromise.thenOnResult(new ResultHandler<ConnectorInfo>() {
public void handleResult(ConnectorInfo result) {
Expand All @@ -195,6 +196,9 @@ public void handleException(RuntimeException error) {
}
});

keyRangePromise.getOrThrowUninterruptibly(10, TimeUnit.SECONDS);
Assert.assertTrue(keyRangePromise.isDone());

manager.addConnectorBundle(bundle11);

keyRangePromise =
Expand All @@ -203,7 +207,6 @@ public void handleException(RuntimeException error) {
"org.identityconnectors.testconnector.TstConnector").setBundleVersion(
"[1.0,2.0)").build());

Assert.assertTrue(keyRangePromise.isDone());

keyRangePromise.thenOnResult(new ResultHandler<ConnectorInfo>() {
public void handleResult(ConnectorInfo result) {
Expand All @@ -214,7 +217,8 @@ public void handleException(RuntimeException error) {
Assert.fail("KeyRange search should succeed", error);
}
});

keyRangePromise.getOrThrowUninterruptibly(10, TimeUnit.SECONDS);
Assert.assertTrue(keyRangePromise.isDone());
} finally {
connectorFramework.release();
}
Expand Down

0 comments on commit f744a3d

Please sign in to comment.