ACS-6304 Add retry mechanism to completeRecordsCantBeUpdated test (#2405)

ACS-6304 Add retry mechanism to completeRecordsCantBeUpdated test
This commit is contained in:
mikolajbrzezinski
2024-01-23 12:39:21 +01:00
committed by GitHub
parent 2c5a745b50
commit 12e1506d01
2 changed files with 50 additions and 4 deletions

View File

@@ -62,6 +62,7 @@ import org.alfresco.rest.rm.community.requests.gscore.api.RecordFolderAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.RecordsAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.UnfiledContainerAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.UnfiledRecordFolderAPI;
import org.alfresco.rest.rm.community.utils.AlfrescoRetryAnalyzer;
import org.alfresco.rest.v0.service.RoleService;
import org.alfresco.test.AlfrescoTest;
import org.alfresco.utility.model.UserModel;
@@ -289,10 +290,11 @@ public class UpdateRecordsTests extends BaseRMRestTest
* </pre>
*/
@Test
(
dataProvider = "completeRecords",
description = "Complete records can't be updated"
)
(
dataProvider = "completeRecords",
description = "Complete records can't be updated",
retryAnalyzer = AlfrescoRetryAnalyzer.class
)
@AlfrescoTest(jira="RM-4362")
@Bug (id = "APPS-132")
public void completeRecordsCantBeUpdated(String electronicRecordId, String nonElectronicRecordId)

View File

@@ -0,0 +1,44 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2024 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.rm.community.utils;
import org.testng.ITestResult;
import org.testng.util.RetryAnalyzerCount;
public class AlfrescoRetryAnalyzer extends RetryAnalyzerCount
{
public AlfrescoRetryAnalyzer() {
super();
setCount(3);
}
@Override
public boolean retryMethod(ITestResult result)
{
return true;
}
}