mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -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");
|
||||||
|
@@ -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);
|
||||||
|
|
||||||
// submit the changes
|
List<AssetInfo> changedAssets = sbService.listChangedWebApp(sbStoreId, defaultWebApp, true);
|
||||||
sbService.submitWebApp(sbStoreId, defaultWebApp, "some updates by "+user, null);
|
|
||||||
|
|
||||||
snapCnt += (canUpdateExisting || canDeleteExisting) ? (1):(0);
|
if (changedAssets.size() > 0)
|
||||||
pollForSnapshotCount(stagingStoreId, snapCnt);
|
{
|
||||||
|
// submit the changes
|
||||||
|
sbService.submitWebApp(sbStoreId, defaultWebApp, "some updates by "+user, "some updates by "+user);
|
||||||
|
|
||||||
|
snapCnt += (canUpdateExisting || canDeleteExisting) ? (1):(0);
|
||||||
|
pollForSnapshotCount(stagingStoreId, snapCnt);
|
||||||
|
|
||||||
|
assertEquals(0, sbService.listChangedWebApp(sbStoreId, defaultWebApp, true).size());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testRenameFile()
|
public void testRenameFile()
|
||||||
|
Reference in New Issue
Block a user