You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by kw...@apache.org on 2022/01/07 18:29:27 UTC

[jackrabbit-filevault] branch feature/JCRVLT-580-parameterize-maven-version updated (3526986 -> 990e2ec)

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

kwin pushed a change to branch feature/JCRVLT-580-parameterize-maven-version
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault.git.


 discard 3526986  releng: retry deleting directories on Windows
     new 990e2ec  releng: retry deleting directories on Windows

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (3526986)
            \
             N -- N -- N   refs/heads/feature/JCRVLT-580-parameterize-maven-version (990e2ec)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 Jenkinsfile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

[jackrabbit-filevault] 01/01: releng: retry deleting directories on Windows

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch feature/JCRVLT-580-parameterize-maven-version
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault.git

commit 990e2eceb3bff5093fc2942b396eede11b09af4f
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Fri Jan 7 17:11:26 2022 +0100

    releng: retry deleting directories on Windows
---
 Jenkinsfile                                        |  4 ++--
 .../packaging/integration/IntegrationTestBase.java | 25 ++++++++++++++++++++--
 2 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index f238914..3bce96b 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -18,10 +18,10 @@
  * under the License.
  */
 // use the shared library from https://github.com/apache/jackrabbit-filevault-jenkins-lib
-library "filevault@feature/JCRVLT-580-parameterize-maven-version"
+library "filevault@master"
 
 vaultPipeline('ubuntu', 11, '3', {
-   vaultStageBuild(['ubuntu', 'Windows'], [8, 11, 17], ['3', '3.6.3'], 'apache_jackrabbit-filevault-package-maven-plugin')
+   vaultStageBuild(['ubuntu', 'Windows'], [8, 11, 17], ['3', '3.6.3'], 'apache_jackrabbit-filevault')
    vaultStageDeploy()
   }
 )
\ No newline at end of file
diff --git a/vault-core/src/test/java/org/apache/jackrabbit/vault/packaging/integration/IntegrationTestBase.java b/vault-core/src/test/java/org/apache/jackrabbit/vault/packaging/integration/IntegrationTestBase.java
index 8e522bc..8feb266 100644
--- a/vault-core/src/test/java/org/apache/jackrabbit/vault/packaging/integration/IntegrationTestBase.java
+++ b/vault-core/src/test/java/org/apache/jackrabbit/vault/packaging/integration/IntegrationTestBase.java
@@ -109,6 +109,7 @@ import org.apache.jackrabbit.vault.packaging.impl.ActivityLog;
 import org.apache.jackrabbit.vault.packaging.impl.JcrPackageManagerImpl;
 import org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage;
 import org.apache.jackrabbit.vault.packaging.registry.impl.JcrPackageRegistry;
+import org.codehaus.plexus.util.Os;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Before;
@@ -268,18 +269,38 @@ public class IntegrationTestBase  {
         return new DataStoreBlobStore(fds);
     }
 
+    private static void deleteDirectory(File directory) throws IOException {
+        try {
+            FileUtils.deleteDirectory(directory);
+        } catch (IOException ioe) {
+            // retry after wait on Windows, as it may release file locks in a deferred manner
+            if (Os.isFamily(Os.FAMILY_WINDOWS)) {
+                try {
+                    Thread.sleep(100);
+                } catch (InterruptedException ie) {
+                    Thread.currentThread().interrupt();
+                    IOException wrappedIOException = new IOException("Initially failed with IOException and waiting was interrupted", ioe);
+                    wrappedIOException.addSuppressed(ie);
+                }
+                FileUtils.deleteDirectory(directory);
+            } else {
+                throw ioe;
+            }
+        }
+    }
+
     @AfterClass
     public static void shutdownRepository() throws IOException {
         if (repository instanceof RepositoryImpl) {
             ((RepositoryImpl) repository).shutdown();
-            FileUtils.deleteDirectory(DIR_JR2_REPO_HOME);
+            deleteDirectory(DIR_JR2_REPO_HOME);
         } else if (repository instanceof org.apache.jackrabbit.oak.jcr.repository.RepositoryImpl) {
             ((org.apache.jackrabbit.oak.jcr.repository.RepositoryImpl) repository).shutdown();
             if (fileStore != null) {
                 fileStore.close();
                 fileStore = null;
             }
-            FileUtils.deleteDirectory(DIR_OAK_REPO_HOME);
+            deleteDirectory(DIR_OAK_REPO_HOME);
         }
         repository = null;
     }