This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch feature/intellij
in repository https://gitbox.apache.org/repos/asf/sling-ide-tooling.git


The following commit(s) were added to refs/heads/feature/intellij by this push:
     new c726ea4  SLING-5648 - Make Non-Eclipse Module regular Maven Packages
c726ea4 is described below

commit c726ea4dd513d95f68fe6e0292e5a64c42caac7b
Author: Robert Munteanu <romb...@apache.org>
AuthorDate: Thu Apr 12 16:17:02 2018 +0300

    SLING-5648 - Make Non-Eclipse Module regular Maven Packages
    
    Fix the BundleDeploymentTest by making sure that the project is built.
    My suspicion is that moving to a newer test target has changed the
    test timings, leading to this new failure.
---
 .../org/apache/sling/ide/test/impl/BundleDeploymentTest.java | 12 +++++++++++-
 .../src/org/apache/sling/ide/test/impl/helpers/Poller.java   |  5 +++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git 
a/eclipse/eclipse-test/src/org/apache/sling/ide/test/impl/BundleDeploymentTest.java
 
b/eclipse/eclipse-test/src/org/apache/sling/ide/test/impl/BundleDeploymentTest.java
index 9243f2a..9be7766 100644
--- 
a/eclipse/eclipse-test/src/org/apache/sling/ide/test/impl/BundleDeploymentTest.java
+++ 
b/eclipse/eclipse-test/src/org/apache/sling/ide/test/impl/BundleDeploymentTest.java
@@ -38,6 +38,7 @@ import org.apache.sling.ide.test.impl.helpers.ServerAdapter;
 import org.apache.sling.ide.test.impl.helpers.SlingWstServer;
 import org.apache.sling.ide.test.impl.helpers.TemporaryProject;
 import org.apache.sling.ide.test.impl.helpers.ToolingSupportBundle;
+import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.jdt.core.JavaCore;
@@ -84,7 +85,7 @@ public class BundleDeploymentTest {
         wstServer.waitForServerToStart();
 
         // create faceted project
-        IProject bundleProject = projectRule.getProject();
+        final IProject bundleProject = projectRule.getProject();
 
         ProjectAdapter project = new ProjectAdapter(bundleProject);
         project.addNatures(JavaCore.NATURE_ID, 
"org.eclipse.wst.common.project.facet.core.nature");
@@ -113,6 +114,15 @@ public class BundleDeploymentTest {
         // install bundle facet
         project.installFacet("sling.bundle", "1.0");
 
+        // ensure that the project is built and deployable
+        new Poller().pollUntilTrue(new Callable<Boolean>() {
+            @Override
+            public Boolean call() throws Exception {
+                IFile outputManifest = 
bundleProject.getFile(Path.fromPortableString("bin/META-INF/MANIFEST.MF"));
+                return outputManifest.exists();
+            }
+        });
+
         ServerAdapter server = new ServerAdapter(wstServer.getServer());
         server.setAttribute(ISlingLaunchpadServer.PROP_INSTALL_LOCALLY, 
installBundleLocally);
         server.installModule(bundleProject);
diff --git 
a/eclipse/eclipse-test/src/org/apache/sling/ide/test/impl/helpers/Poller.java 
b/eclipse/eclipse-test/src/org/apache/sling/ide/test/impl/helpers/Poller.java
index 5c8e56f..a308f52 100644
--- 
a/eclipse/eclipse-test/src/org/apache/sling/ide/test/impl/helpers/Poller.java
+++ 
b/eclipse/eclipse-test/src/org/apache/sling/ide/test/impl/helpers/Poller.java
@@ -20,6 +20,7 @@ import static org.junit.Assert.assertThat;
 
 import java.util.concurrent.Callable;
 
+import org.hamcrest.CoreMatchers;
 import org.hamcrest.Matcher;
 
 import junit.framework.AssertionFailedError;
@@ -99,4 +100,8 @@ public class Poller {
         // safe, since only we write in holder[0]
         return (V) holder[0];
     }
+
+    public void pollUntilTrue(final Callable<Boolean> callable) throws 
InterruptedException {
+        pollUntil(callable, CoreMatchers.equalTo(true));
+    }
 }

-- 
To stop receiving notification emails like this one, please contact
romb...@apache.org.

Reply via email to