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/07/28 14:39:46 UTC
[jackrabbit-filevault] branch bugfix/nt-file-import-failure updated: fix IT
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch bugfix/nt-file-import-failure
in repository https://gitbox.apache.org/repos/asf/jackrabbit-filevault.git
The following commit(s) were added to refs/heads/bugfix/nt-file-import-failure by this push:
new e170dc40 fix IT
e170dc40 is described below
commit e170dc4012b4988ada0f59e6abd74933f3a3e065
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Thu Jul 28 16:39:40 2022 +0200
fix IT
---
.../jackrabbit/vault/packaging/integration/ImportIT.java | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/vault-core/src/test/java/org/apache/jackrabbit/vault/packaging/integration/ImportIT.java b/vault-core/src/test/java/org/apache/jackrabbit/vault/packaging/integration/ImportIT.java
index 3c50a033..bb45fa3e 100644
--- a/vault-core/src/test/java/org/apache/jackrabbit/vault/packaging/integration/ImportIT.java
+++ b/vault-core/src/test/java/org/apache/jackrabbit/vault/packaging/integration/ImportIT.java
@@ -23,13 +23,20 @@ import static org.junit.Assert.assertFalse;
import java.io.IOException;
import java.security.Principal;
+import javax.jcr.AccessDeniedException;
+import javax.jcr.InvalidItemStateException;
+import javax.jcr.ItemExistsException;
import javax.jcr.Node;
+import javax.jcr.ReferentialIntegrityException;
import javax.jcr.Repository;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
import javax.jcr.SimpleCredentials;
+import javax.jcr.lock.LockException;
import javax.jcr.nodetype.ConstraintViolationException;
+import javax.jcr.nodetype.NoSuchNodeTypeException;
import javax.jcr.nodetype.NodeType;
+import javax.jcr.version.VersionException;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.apache.jackrabbit.api.JackrabbitSession;
@@ -424,17 +431,15 @@ public class ImportIT extends IntegrationTestBase {
}
@Test
- public void testPackageWithNtFile() throws IOException, ConfigurationException {
+ public void testPackageWithNtFile() throws IOException, ConfigurationException, AccessDeniedException, ItemExistsException, ReferentialIntegrityException, ConstraintViolationException, InvalidItemStateException, VersionException, LockException, NoSuchNodeTypeException, RepositoryException {
// first try a regular installation (which should fail)
ImportOptions opts = getDefaultOptions();
+ opts.setAutoSaveThreshold(1);
Importer importer = new Importer(opts);
try (Archive archive = getFileArchive("/test-packages/nt_file_package.zip")) {
archive.open(true);
importer.run(archive, admin.getRootNode());
- admin.save();
- //Assert.fail("Installing the package should fail as it tries to install an nt:unstructured node below an nt:folder node");
- } catch (RepositoryException e) {
- // expected
+ admin.save();
}
}
}
\ No newline at end of file