mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-17 14:21:39 +00:00
ACS-3841 Test AlphabeticallyPriorityInterceptor [ags]
This commit is contained in:
@@ -385,6 +385,7 @@ jobs:
|
|||||||
|
|
||||||
- name: "AGS Community Rest API Tests"
|
- name: "AGS Community Rest API Tests"
|
||||||
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip ags\]/) OR commit_message =~ /\[ags\]/
|
if: (branch =~ /(release\/.*$|master)/ AND commit_message !~ /\[skip ags\]/) OR commit_message =~ /\[ags\]/
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
install: travis_retry travis_wait 40 env REQUIRES_LOCAL_IMAGES=true bash scripts/travis/build.sh
|
install: travis_retry travis_wait 40 env REQUIRES_LOCAL_IMAGES=true bash scripts/travis/build.sh
|
||||||
addons:
|
addons:
|
||||||
artifacts:
|
artifacts:
|
||||||
|
@@ -0,0 +1,20 @@
|
|||||||
|
package org.alfresco.rest.rm.community.utils;
|
||||||
|
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import org.testng.IMethodInstance;
|
||||||
|
import org.testng.IMethodInterceptor;
|
||||||
|
import org.testng.ITestContext;
|
||||||
|
|
||||||
|
public class AlphabeticallyPriorityInterceptor implements IMethodInterceptor
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public List<IMethodInstance> intercept(List<IMethodInstance> methods,
|
||||||
|
ITestContext context)
|
||||||
|
{
|
||||||
|
return methods.stream().sorted(Comparator.comparing(el -> el.getMethod().getTestClass().toString()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
}
|
@@ -1,16 +1,12 @@
|
|||||||
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
|
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
|
||||||
|
|
||||||
<suite name="TestNG AllTestSuite" configfailurepolicy="continue" verbose="1" time-out="300000">
|
<suite name="TestNG AllTestSuite" configfailurepolicy="continue" verbose="1" time-out="300000">
|
||||||
<test name="restapi - records">
|
<listeners>
|
||||||
<packages>
|
<listener class-name="org.alfresco.rest.rm.community.utils.AlphabeticallyPriorityInterceptor" />
|
||||||
<package name="org.alfresco.rest.rm.community.records" />
|
</listeners>
|
||||||
</packages>
|
|
||||||
</test>
|
|
||||||
<test name="restapi">
|
<test name="restapi">
|
||||||
<packages>
|
<packages>
|
||||||
<package name="org.alfresco.rest.rm.community.*">
|
<package name="org.alfresco.rest.rm.community.*"/>
|
||||||
<exclude name="org.alfresco.rest.rm.community.records" />
|
|
||||||
</package>
|
|
||||||
</packages>
|
</packages>
|
||||||
</test>
|
</test>
|
||||||
</suite>
|
</suite>
|
||||||
|
Reference in New Issue
Block a user