ALF-4291: PostgreSQL - AVM index/search (wip)

- split concurrency test(s) into separate file and added to AVMTestSuite
- added missing close(s) for calls to AVM createFile

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22307 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2010-09-07 16:04:45 +00:00
parent d4a3467969
commit 741558a28b
6 changed files with 66 additions and 481 deletions

View File

@@ -18,6 +18,8 @@
*/
package org.alfresco.repo.avm;
import java.io.IOException;
import org.alfresco.config.JNDIConstants;
import org.alfresco.service.cmr.avm.AVMNodeDescriptor;
import org.alfresco.service.cmr.repository.NodeRef;
@@ -39,7 +41,7 @@ public class WCMInheritPermissionsTest extends AVMServiceTestBase
permissionService = (PermissionService)fContext.getBean("permissionService");
}
private void createStagingWithSnapshots(String storeName)
private void createStagingWithSnapshots(String storeName) throws IOException
{
if (fService.getStore(storeName) != null)
{
@@ -58,7 +60,7 @@ public class WCMInheritPermissionsTest extends AVMServiceTestBase
fService.createDirectory(storeName + ":/" + JNDIConstants.DIR_DEFAULT_WWW + "/" + JNDIConstants.DIR_DEFAULT_APPBASE, ROOT);
fService.createSnapshot(storeName, "third", "third");
assertNotNull(fService.lookup(-1, storeName + ":/" + JNDIConstants.DIR_DEFAULT_WWW + "/" + JNDIConstants.DIR_DEFAULT_APPBASE + "/" + ROOT));
fService.createFile(storeName + ":/" + JNDIConstants.DIR_DEFAULT_WWW + "/" + JNDIConstants.DIR_DEFAULT_APPBASE + "/" + ROOT, FILE_NAME);
fService.createFile(storeName + ":/" + JNDIConstants.DIR_DEFAULT_WWW + "/" + JNDIConstants.DIR_DEFAULT_APPBASE + "/" + ROOT, FILE_NAME).close();
fService.createSnapshot(storeName, "fourth", "fourth");
assertNotNull(fService.lookup(-1, storeName + ":/" + JNDIConstants.DIR_DEFAULT_WWW + "/" + JNDIConstants.DIR_DEFAULT_APPBASE + "/" + ROOT + "/" + FILE_NAME));
}
@@ -69,7 +71,7 @@ public class WCMInheritPermissionsTest extends AVMServiceTestBase
assertNull(fService.getStore(storeName));
}
public void testSetInheritParentPermissions()
public void testSetInheritParentPermissions() throws IOException
{
createStagingWithSnapshots(STORE_NAME);