Merged BRANCHES/V3.4 to HEAD:

24746: Build/test fix: PostgreSQL -AssetServiceImplTest.renameFolder
   24767: Merged BRANCHES/V3.3 to BRANCHES/V3.4:
        24765: ALF-6547: fix intermittent test failure (AssetServiceImplTest renameFile/renameFolder) - fallout from ALF-1948


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@24897 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2011-01-18 11:14:39 +00:00
parent 4224441ffc
commit 5033166170
2 changed files with 18 additions and 8 deletions

View File

@@ -164,10 +164,13 @@ public class AbstractWCMServiceImplTest extends TestCase
protected void createUser(String userName) protected void createUser(String userName)
{ {
if (authenticationService.authenticationExists(userName) == false) if (! authenticationService.authenticationExists(userName))
{ {
authenticationService.createAuthentication(userName, "PWD".toCharArray()); authenticationService.createAuthentication(userName, "PWD".toCharArray());
}
if (! personService.personExists(userName))
{
PropertyMap ppOne = new PropertyMap(4); PropertyMap ppOne = new PropertyMap(4);
ppOne.put(ContentModel.PROP_USERNAME, userName); ppOne.put(ContentModel.PROP_USERNAME, userName);
ppOne.put(ContentModel.PROP_FIRSTNAME, "firstName"); ppOne.put(ContentModel.PROP_FIRSTNAME, "firstName");

View File

@@ -399,7 +399,7 @@ public class AssetServiceImplTest extends AbstractWCMServiceImplTest
writer.putContent(FILE); writer.putContent(FILE);
} }
sbService.submitWebApp(sbStoreId, defaultWebApp, "some existing folders and files", null); sbService.submitWebApp(sbStoreId, defaultWebApp, "some existing folders and files", "some existing folders and files");
pollForSnapshotCount(stagingStoreId, 1); pollForSnapshotCount(stagingStoreId, 1);
@@ -666,11 +666,18 @@ public class AssetServiceImplTest extends AbstractWCMServiceImplTest
// switch to user // switch to user
AuthenticationUtil.setFullyAuthenticatedUser(user); AuthenticationUtil.setFullyAuthenticatedUser(user);
List<AssetInfo> changedAssets = sbService.listChangedWebApp(sbStoreId, defaultWebApp, true);
if (changedAssets.size() > 0)
{
// submit the changes // submit the changes
sbService.submitWebApp(sbStoreId, defaultWebApp, "some updates by "+user, null); sbService.submitWebApp(sbStoreId, defaultWebApp, "some updates by "+user, "some updates by "+user);
snapCnt += (canUpdateExisting || canDeleteExisting) ? (1):(0); snapCnt += (canUpdateExisting || canDeleteExisting) ? (1):(0);
pollForSnapshotCount(stagingStoreId, snapCnt); pollForSnapshotCount(stagingStoreId, snapCnt);
assertEquals(0, sbService.listChangedWebApp(sbStoreId, defaultWebApp, true).size());
}
} }
public void testRenameFile() public void testRenameFile()