Skip to content

Commit

Permalink
LRCI-4360 Do not include extra properties in the job summary for the …
Browse files Browse the repository at this point in the history
…rule engine
  • Loading branch information
brittneyq authored and brianchandotcom committed Jul 25, 2024
1 parent 1b32686 commit c50da53
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ public int getAxisCount() {
}

public List<JobProperty> getExcludesJobProperties() {
if (_jUnitTestBatch != null) {
List<JobProperty> testBatchJobProperties =
getTestSelectorExcludesJobProperties();

recordJobProperties(testBatchJobProperties);

return testBatchJobProperties;
}

List<JobProperty> excludesJobProperties = new ArrayList<>();

excludesJobProperties.addAll(getRequiredExcludesJobProperties());
Expand Down Expand Up @@ -105,6 +114,15 @@ public List<JobProperty> getFilterJobProperties() {
}

public List<JobProperty> getIncludesJobProperties() {
if (_jUnitTestBatch != null) {
List<JobProperty> testBatchJobProperties =
getTestSelectorIncludesJobProperties();

recordJobProperties(testBatchJobProperties);

return testBatchJobProperties;
}

List<JobProperty> includesJobProperties = new ArrayList<>();

includesJobProperties.addAll(getRequiredIncludesJobProperties());
Expand Down Expand Up @@ -568,6 +586,18 @@ protected List<JobProperty> getStableRequiredIncludesJobProperties() {
return includesJobProperties;
}

protected List<JobProperty> getTestSelectorExcludesJobProperties() {
JUnitTestSelector jUnitTestSelector = _jUnitTestBatch.getTestSelector();

return jUnitTestSelector.getExcludesJobProperties();
}

protected List<JobProperty> getTestSelectorIncludesJobProperties() {
JUnitTestSelector jUnitTestSelector = _jUnitTestBatch.getTestSelector();

return jUnitTestSelector.getIncludesJobProperties();
}

@Override
protected boolean ignore() {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import com.liferay.jenkins.results.parser.PortalTestClassJob;
import com.liferay.jenkins.results.parser.job.property.JobProperty;
import com.liferay.jenkins.results.parser.test.batch.JUnitTestBatch;
import com.liferay.jenkins.results.parser.test.batch.JUnitTestSelector;

import java.io.File;
import java.io.IOException;
Expand Down Expand Up @@ -41,17 +40,13 @@ protected ModulesJUnitBatchTestClassGroup(
String batchName, PortalTestClassJob portalTestClassJob) {

super(batchName, portalTestClassJob);

_testBatch = null;
}

protected ModulesJUnitBatchTestClassGroup(
String batchName, PortalTestClassJob portalTestClassJob,
JUnitTestBatch jUnitTestBatch) {

super(batchName, portalTestClassJob, jUnitTestBatch);

_testBatch = jUnitTestBatch;
}

@Override
Expand Down Expand Up @@ -92,10 +87,6 @@ protected List<JobProperty> getReleaseIncludesJobProperties() {

@Override
protected List<JobProperty> getRelevantExcludesJobProperties() {
if (_testBatch != null) {
return _getTestSelectorExcludesJobProperties();
}

Set<File> modifiedModuleDirsList = new HashSet<>();

try {
Expand Down Expand Up @@ -136,10 +127,6 @@ protected List<JobProperty> getRelevantExcludesJobProperties() {

@Override
protected List<JobProperty> getRelevantIncludesJobProperties() {
if (_testBatch != null) {
return _getTestSelectorIncludesJobProperties();
}

if (includeStableTestSuite && isStableTestSuiteBatch()) {
return super.getRelevantIncludesJobProperties();
}
Expand Down Expand Up @@ -400,18 +387,4 @@ private String _getSymbolicName(File bndBndFile) {
return bndBndProperties.getProperty("Bundle-SymbolicName");
}

private List<JobProperty> _getTestSelectorExcludesJobProperties() {
JUnitTestSelector jUnitTestSelector = _testBatch.getTestSelector();

return jUnitTestSelector.getExcludesJobProperties();
}

private List<JobProperty> _getTestSelectorIncludesJobProperties() {
JUnitTestSelector jUnitTestSelector = _testBatch.getTestSelector();

return jUnitTestSelector.getIncludesJobProperties();
}

private JUnitTestBatch _testBatch;

}

0 comments on commit c50da53

Please sign in to comment.