Compare commits

...

15 Commits

Author SHA1 Message Date
Sara Aspery
f4ecf6bc8e Merge branch 'refs/heads/master' into feature/ACS-9200_Bump-agent-java-testng-to-5-4-6-Keep-deprecated-test 2025-05-12 14:26:18 +01:00
Sara Aspery
9d3c352ef8 Merge branch 'refs/heads/master' into feature/ACS-9200_Bump-agent-java-testng-to-5-4-6-Keep-deprecated-test 2025-05-01 07:27:07 +01:00
Sara Aspery
3f463061d6 Merge branch 'refs/heads/master' into feature/ACS-9200_Bump-agent-java-testng-to-5-4-6-Keep-deprecated-test 2025-04-29 14:05:34 +01:00
Sara Aspery
4893f7f208 Merge branch 'refs/heads/master' into feature/ACS-9200_Bump-agent-java-testng-to-5-4-6-Keep-deprecated-test 2025-04-09 16:02:35 +01:00
Sara Aspery
a8ea2af7fc ACS-9200 reformat changes from master 2025-04-09 08:08:39 +01:00
Sara Aspery
3e8bc87faf Merge branch 'refs/heads/master' into feature/ACS-9200_Bump-agent-java-testng-to-5-4-6-Keep-deprecated-test
# Conflicts:
#	remote-api/src/test/java/org/alfresco/repo/webdav/MoveMethodTest.java
#	repository/src/test/java/org/alfresco/repo/content/caching/CachingContentStoreTest.java
#	repository/src/test/java/org/alfresco/repo/lock/LockUtilsTest.java
2025-04-09 00:10:22 +01:00
Sara Aspery
2407b706b5 Merge branch 'refs/heads/master' into feature/ACS-9200_Bump-agent-java-testng-to-5-4-6-Keep-deprecated-test 2025-03-03 10:43:42 +00:00
Sara Aspery
2356d07e7a Merge branch 'refs/heads/master' into feature/ACS-9200_Bump-agent-java-testng-to-5-4-6-Keep-deprecated-test 2025-02-28 16:11:37 +00:00
Sara Aspery
74d31b5a8b Merge branch 'refs/heads/master' into feature/ACS-9200_Bump-agent-java-testng-to-5-4-6-Keep-deprecated-test 2025-02-28 09:52:07 +00:00
Sara Aspery
a08a0dfdef Remove unnecessary stubbings from LockUtilsTest 2025-02-27 23:02:34 +00:00
Sara Aspery
52a3390bff ACS-9200 Bump agent-java-testng to 5.4.6 2025-02-27 20:39:42 +00:00
Sara Aspery
f0b495832f Fix DataDictionaryFolderTest 2025-02-27 20:39:37 +00:00
Sara Aspery
8c65205109 Remove unnecessary stubbings from MoveMethodTest 2025-02-27 20:39:33 +00:00
Sara Aspery
1a729e81c7 Fix failing test 2025-02-27 20:39:28 +00:00
Sara Aspery
bc14c98816 Remove unnecessary stubbings from CachingContentStoreTest 2025-02-27 20:39:16 +00:00
6 changed files with 9 additions and 32 deletions

View File

@@ -825,7 +825,7 @@
<dependency>
<groupId>com.epam.reportportal</groupId>
<artifactId>agent-java-testng</artifactId>
<version>5.4.0</version>
<version>5.4.6</version>
<scope>test</scope>
</dependency>
<dependency>

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* Copyright (C) 2005 - 2025 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -203,9 +203,6 @@ public class MoveMethodTest
@Test
public void canRenameFoldersWhenNewNameMatchesShufflePattern() throws Exception
{
when(davHelper.isRenameShuffle(destPath)).thenReturn(true);
when(davHelper.isRenameShuffle(sourcePath)).thenReturn(false);
// Test: Perform the rename
moveMethod.moveOrCopy(sourceNodeRef, sourceParentNodeRef, destParentNodeRef, "dest.doc");
@@ -247,9 +244,6 @@ public class MoveMethodTest
sourcePath = "/path/from/test.doc";
moveMethod.m_strPath = sourcePath;
when(davHelper.getServiceRegistry()).thenReturn(mockServiceRegistry);
when(mockServiceRegistry.getContentService()).thenReturn(mockContentService);
List<String> sourcePathSplit = Arrays.asList("path", "from", "test.doc");
when(davHelper.splitAllPaths(sourcePath)).thenReturn(sourcePathSplit);
@@ -366,7 +360,6 @@ public class MoveMethodTest
when(mockFileFolderService.resolveNamePath(rootNode, sourcePathSplit)).thenReturn(tmpFI);
when(davHelper.isRenameShuffle(destPath)).thenReturn(false);
when(davHelper.isRenameShuffle(sourcePath)).thenReturn(true);
moveMethod.moveOrCopy(atmpFI.getNodeRef(), companyHomeNodeRef, companyHomeNodeRef, bakFileName);

View File

@@ -46,12 +46,12 @@ import org.alfresco.util.test.junitrules.WellKnownNodes;
public class DataDictionaryFolderTest extends BaseSpringTest
{
@ClassRule
private static final ApplicationContextInit APP_CONTEXT_INIT = new ApplicationContextInit();
public static final ApplicationContextInit APP_CONTEXT_INIT = new ApplicationContextInit();
private static final String DATA_DICTIONARY = "Data Dictionary";
@Rule
private WellKnownNodes wellKnownNodes = new WellKnownNodes(APP_CONTEXT_INIT);
public WellKnownNodes wellKnownNodes = new WellKnownNodes(APP_CONTEXT_INIT);
private NodeService nodeService;

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2023 Alfresco Software Limited
* Copyright (C) 2005 - 2025 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -31,7 +31,6 @@ import java.sql.Savepoint;
import java.util.Map;
import java.util.TreeMap;
import junit.framework.AssertionFailedError;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
@@ -61,7 +60,7 @@ public class EntityLookupCacheTest implements EntityLookupCallbackDAO<Long, Obje
private ControlDAO controlDAO;
@Before
protected void setUp() throws Exception
public void setUp() throws Exception
{
cache = new MemoryCache<Long, Object>();
entityLookupCacheA = new EntityLookupCache<Long, Object, String>(cache, "A", this);
@@ -80,7 +79,7 @@ public class EntityLookupCacheTest implements EntityLookupCallbackDAO<Long, Obje
// Keep the "database" empty
entityLookupCacheA.getByValue(this);
}
catch (AssertionFailedError e)
catch (AssertionError e)
{
// Expected
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* Copyright (C) 2005 - 2025 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -161,7 +161,6 @@ public class CachingContentStoreTest
@Test
public void getReaderForItemMissingFromCacheButNoContentToCache()
{
when(cache.getReader("url")).thenThrow(new CacheMissException("url"));
when(backingStore.getReader("url")).thenReturn(sourceContent);
when(cache.put("url", sourceContent)).thenReturn(false);
@@ -307,7 +306,6 @@ public class CachingContentStoreTest
// Don't veto writing the cache file.
when(quota.beforeWritingCacheFile(1274L)).thenReturn(true);
// Do request cache file deletion.
when(quota.afterWritingCacheFile(1234L)).thenReturn(false);
ContentReader returnedReader = cachingStore.getReader("url");

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* Copyright (C) 2005 - 2025 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -34,8 +34,6 @@ import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import org.alfresco.service.cmr.lock.LockService;
import org.alfresco.service.cmr.lock.LockStatus;
import org.alfresco.service.cmr.lock.LockType;
import org.alfresco.service.cmr.repository.NodeRef;
/**
@@ -53,8 +51,6 @@ public class LockUtilsTest
@Test
public void testIsLockedAndReadOnly_ForLockOwnerWithNullLockType()
{
when(lockService.getLockStatus(nodeRef)).thenReturn(LockStatus.LOCK_OWNER);
when(lockService.getLockType(nodeRef)).thenReturn(null);
when(lockService.isLockedAndReadOnly(nodeRef)).thenReturn(true);
boolean returnedVal = LockUtils.isLockedAndReadOnly(nodeRef, lockService);
@@ -64,8 +60,6 @@ public class LockUtilsTest
@Test
public void testIsLockedAndReadOnly_ForLockOwnerWithWriteLockType()
{
when(lockService.getLockStatus(nodeRef)).thenReturn(LockStatus.LOCK_OWNER);
when(lockService.getLockType(nodeRef)).thenReturn(LockType.WRITE_LOCK);
when(lockService.isLockedAndReadOnly(nodeRef)).thenReturn(false);
boolean returnedVal = LockUtils.isLockedAndReadOnly(nodeRef, lockService);
@@ -75,8 +69,6 @@ public class LockUtilsTest
@Test
public void testIsLockedAndReadOnly_ForLockOwnerWithNodeLockType()
{
when(lockService.getLockStatus(nodeRef)).thenReturn(LockStatus.LOCK_OWNER);
when(lockService.getLockType(nodeRef)).thenReturn(LockType.NODE_LOCK);
when(lockService.isLockedAndReadOnly(nodeRef)).thenReturn(true);
boolean returnedVal = LockUtils.isLockedAndReadOnly(nodeRef, lockService);
@@ -86,8 +78,6 @@ public class LockUtilsTest
@Test
public void testIsLockedAndReadOnly_ForLockOwnerWithReadOnlyLockType()
{
when(lockService.getLockStatus(nodeRef)).thenReturn(LockStatus.LOCK_OWNER);
when(lockService.getLockType(nodeRef)).thenReturn(LockType.READ_ONLY_LOCK);
when(lockService.isLockedAndReadOnly(nodeRef)).thenReturn(true);
boolean returnedVal = LockUtils.isLockedAndReadOnly(nodeRef, lockService);
@@ -97,7 +87,6 @@ public class LockUtilsTest
@Test
public void testIsLockedAndReadOnly_ForNoLock()
{
when(lockService.getLockStatus(nodeRef)).thenReturn(LockStatus.NO_LOCK);
when(lockService.isLockedAndReadOnly(nodeRef)).thenReturn(false);
boolean returnedVal = LockUtils.isLockedAndReadOnly(nodeRef, lockService);
@@ -107,7 +96,6 @@ public class LockUtilsTest
@Test
public void testIsLockedAndReadOnly_ForExpiredLock()
{
when(lockService.getLockStatus(nodeRef)).thenReturn(LockStatus.LOCK_EXPIRED);
when(lockService.isLockedAndReadOnly(nodeRef)).thenReturn(false);
boolean returnedVal = LockUtils.isLockedAndReadOnly(nodeRef, lockService);
@@ -117,7 +105,6 @@ public class LockUtilsTest
@Test
public void testIsLockedAndReadOnly_ForLock()
{
when(lockService.getLockStatus(nodeRef)).thenReturn(LockStatus.LOCKED);
when(lockService.isLockedAndReadOnly(nodeRef)).thenReturn(true);
boolean returnedVal = LockUtils.isLockedAndReadOnly(nodeRef, lockService);