Skip to content
Permalink
Browse files
Show tests with duration > 1 minute in RunAll: Filtering history by s…
…cale factor: Dummy limitation for a number of checks to be done - Fixes #138.

Signed-off-by: Dmitriy Pavlov <dpavlov@apache.org>
  • Loading branch information
dspavlov committed Jul 29, 2019
1 parent b554f25 commit 1c14ecacf3d5d47fcecdfc7a0b4ffd02178b19ca
Show file tree
Hide file tree
Showing 12 changed files with 169 additions and 55 deletions.
@@ -578,6 +578,7 @@ protected String checkFailuresEx(String brachName) {
SyncMode.RELOAD_QUEUED,
false,
null,
null,
DisplayMode.None,
null,
-1);
@@ -590,6 +591,7 @@ protected String checkFailuresEx(String brachName) {
SyncMode.RELOAD_QUEUED,
false,
null,
null,
DisplayMode.OnlyFailures,
null,
-1);
@@ -82,6 +82,7 @@ public void showChainOnServersResults(StringBuilder res, Integer buildId, String
false,
failRateBranch,
SyncMode.RELOAD_QUEUED,
null,
null);

DsChainUi status = new DsChainUi(srvCode, tcIgn.serverCode(), ctx.branchName());
@@ -132,6 +132,7 @@ public DsSummaryUi getBuildTestFailsNoSync(
false,
failRateBranch,
syncMode,
null,
null);

DsChainUi chainStatus = new DsChainUi(srvCode, tcIgnited.serverCode(), ctx.branchName());
@@ -67,12 +67,14 @@ public UpdateInfo getTestFailsUpdates(@Nullable @QueryParam("branch") String bra
@Nullable @QueryParam("checkAllLogs") Boolean checkAllLogs,
@Nullable @QueryParam("trustedTests") Boolean trustedTests,
@Nullable @QueryParam("tagSelected") String tagSelected,
@Nullable @QueryParam("tagForHistSelected") String tagForHistSelected,
@Nullable @QueryParam("displayMode") String displayMode,
@Nullable @QueryParam("sortOption") String sortOption,
@Nullable @QueryParam("count") Integer mergeCnt,
@Nullable @QueryParam("showTestLongerThan") Integer showTestLongerThan) {
return new UpdateInfo().copyFrom(getTestFailsResultsNoSync(branchOrNull, checkAllLogs, trustedTests, tagSelected,
displayMode, sortOption, mergeCnt, showTestLongerThan));
return new UpdateInfo().copyFrom(
getTestFailsResultsNoSync(branchOrNull, checkAllLogs, trustedTests, tagSelected, tagForHistSelected,
displayMode, sortOption, mergeCnt, showTestLongerThan));
}

@GET
@@ -82,11 +84,13 @@ public String getTestFailsText(@Nullable @QueryParam("branch") String branchOrNu
@Nullable @QueryParam("checkAllLogs") Boolean checkAllLogs,
@Nullable @QueryParam("trustedTests") Boolean trustedTests,
@Nullable @QueryParam("tagSelected") String tagSelected,
@Nullable @QueryParam("tagForHistSelected") String tagForHistSelected,
@Nullable @QueryParam("displayMode") String displayMode,
@Nullable @QueryParam("sortOption") String sortOption,
@Nullable @QueryParam("count") Integer mergeCnt,
@Nullable @QueryParam("showTestLongerThan") Integer showTestLongerThan) {
return getTestFailsResultsNoSync(branchOrNull, checkAllLogs, trustedTests, tagSelected, displayMode, sortOption, mergeCnt, showTestLongerThan).toString();
return getTestFailsResultsNoSync(branchOrNull, checkAllLogs, trustedTests, tagSelected, tagForHistSelected,
displayMode, sortOption, mergeCnt, showTestLongerThan).toString();
}

@GET
@@ -96,11 +100,13 @@ public DsSummaryUi getTestFailsResultsNoSync(
@Nullable @QueryParam("checkAllLogs") Boolean checkAllLogs,
@Nullable @QueryParam("trustedTests") Boolean trustedTests,
@Nullable @QueryParam("tagSelected") String tagSelected,
@Nullable @QueryParam("tagForHistSelected") String tagForHistSelected,
@Nullable @QueryParam("displayMode") String displayMode,
@Nullable @QueryParam("sortOption") String sortOption,
@Nullable @QueryParam("count") Integer mergeCnt,
@Nullable @QueryParam("showTestLongerThan") Integer showTestLongerThan) {
return latestBuildResults(branch, checkAllLogs, trustedTests, tagSelected, SyncMode.NONE, displayMode, sortOption, mergeCnt, showTestLongerThan);
return latestBuildResults(branch, checkAllLogs, trustedTests, tagSelected, tagForHistSelected,
SyncMode.NONE, displayMode, sortOption, mergeCnt, showTestLongerThan);
}

@GET
@@ -111,18 +117,21 @@ public DsSummaryUi getTestFailsNoCache(
@Nullable @QueryParam("checkAllLogs") Boolean checkAllLogs,
@Nullable @QueryParam("trustedTests") Boolean trustedTests,
@Nullable @QueryParam("tagSelected") String tagSelected,
@Nullable @QueryParam("tagForHistSelected") String tagForHistSelected,
@Nullable @QueryParam("displayMode") String displayMode,
@Nullable @QueryParam("sortOption") String sortOption,
@Nullable @QueryParam("count") Integer mergeCnt,
@Nullable @QueryParam("showTestLongerThan") Integer showTestLongerThan) {
return latestBuildResults(branch, checkAllLogs, trustedTests, tagSelected, SyncMode.RELOAD_QUEUED, displayMode, sortOption, mergeCnt, showTestLongerThan);
return latestBuildResults(branch, checkAllLogs, trustedTests, tagSelected, tagForHistSelected,
SyncMode.RELOAD_QUEUED, displayMode, sortOption, mergeCnt, showTestLongerThan);
}

@NotNull private DsSummaryUi latestBuildResults(
@Nullable String branch,
@Nullable Boolean checkAllLogs,
@Nullable Boolean trustedTests,
@Nullable String tagSelected,
@Nullable String tagForHistSelected,
@Nonnull SyncMode mode,
@Nullable String displayMode,
@Nullable String sortOption,
@@ -138,7 +147,7 @@ public DsSummaryUi getTestFailsNoCache(

return injector.getInstance(IDetailedStatusForTrackedBranch.class)
.getTrackedBranchTestFailures(branch, checkAllLogs, actualMergeBuilds, creds, mode,
Boolean.TRUE.equals(trustedTests), tagSelected,
Boolean.TRUE.equals(trustedTests), tagSelected, tagForHistSelected,
DisplayMode.parseStringValue(displayMode),
SortOption.parseStringValue(sortOption),
maxDurationSec);
@@ -180,7 +189,7 @@ public DsSummaryUi getAllTestFailsForMergedBuidls(@Nullable @QueryParam("branch"

return injector.getInstance(TrackedBranchChainsProcessor.class)
.getTrackedBranchTestFailures(branchOpt, checkAllLogs, cntLimit, creds, mode,
false, null, DisplayMode.OnlyFailures, null, -1);
false, null, null, DisplayMode.OnlyFailures, null, -1);
}

/**
@@ -61,6 +61,9 @@
data: {
tagSelected: '',
tagsPresent: [""],
tagForHistSelected: '',
tagsForHistPresent: [""],

displayMode: 'Failures',
sortOption: 'FailureRate',
//count of builds to merge
@@ -69,14 +72,11 @@
checkAllLogs: false,
hideFlakyFailures: false,

absMinFailRate: 0,
absMaxFailRate: 100,
failRateRange: [min, max],

showTestLongerThan: '',

tagForHistorySelected: '',
tagsForHistoryPresent: []
absMinFailRate: 0,
absMaxFailRate: 100,
failRateRange: [min, max]
},
methods: {
formChanged: function () {
@@ -118,10 +118,10 @@
if (showTestLongerThan != null)
gVue.$data.showTestLongerThan = showTestLongerThan;

let tagForHistorySelected = findGetParameter("tagForHistorySelected");
if (tagForHistorySelected != null) {
gVue.$data.tagsForHistoryPresent.push(tagForHistorySelected);
gVue.$data.tagForHistorySelected = tagForHistorySelected;
let tagForHistSelected = findGetParameter("tagForHistSelected");
if (tagForHistSelected != null) {
gVue.$data.tagsForHistPresent.push(tagForHistSelected);
gVue.$data.tagForHistSelected = tagForHistSelected;
}

genLink();
@@ -177,8 +177,8 @@

curReqParms += "&hideFlakyFailures=" + gVue.$data.hideFlakyFailures;

if (gVue.$data.tagForHistorySelected != null)
curReqParms += "&tagForHistorySelected=" + gVue.$data.tagForHistorySelected;
if (gVue.$data.tagForHistSelected != null)
curReqParms += "&tagForHistSelected=" + gVue.$data.tagForHistSelected;

if (gVue.$data.showTestLongerThan != null)
curReqParms += "&showTestLongerThan=" + gVue.$data.showTestLongerThan;
@@ -267,7 +267,7 @@

function showData(result) {
let setOfTags = new Set(gVue.$data.tagsPresent);
let setOfHistTags = new Set(gVue.$data.tagForHistorySelected);
let setOfHistTags = new Set(gVue.$data.tagForHistSelected);
for (let i = 0; i < result.servers.length; i++) {
let chain = result.servers[i];

@@ -286,7 +286,7 @@
}

gVue.$data.tagsPresent = Array.from(setOfTags);
gVue.$data.tagsForHistoryPresent = Array.from(setOfHistTags);
gVue.$data.tagsForHistPresent = Array.from(setOfHistTags);

//var txtUrl = "rest/tracked/results/txt" + parmsForRest();

@@ -311,14 +311,24 @@
<table>
<tr>
<td>
<span>Tag filter: </span>
<span title="Tag filter for displaying suites">Tag filter: </span>
<select v-model="tagSelected" @change="formChanged">
<option disabled value="">Please select one</option>

<option v-for="option in tagsPresent" v-bind:value="option">
{{ option }}
</option>
</select>

<span title="Tag filter for filtering history of suites">History tag filter: </span>
<select v-model="tagForHistSelected" @change="formChanged">
<option disabled value="">Please select one</option>

<option v-for="option in tagsForHistPresent" v-bind:value="option">
{{ option }}
</option>
</select>
<br>
<span>Display Mode: </span>
<select v-model="displayMode" @change="formChanged">
<option value="Failures">Show failures only</option>
@@ -329,14 +339,14 @@
<option value="FailureRate">Failure Rate</option>
<option value="SuiteDuration">Suite Duration</option>
</select>
<br>
<span>Merge Builds: </span>
<input v-model.number="count" type="number" @change="formChanged">
&nbsp;&nbsp;<span title="Show trusted tests count">Trusted tests: </span>

<br>&nbsp;&nbsp;<span title="Show trusted tests count">Trusted tests: </span>
<input type="checkbox" v-model="trustedTests" @change="formChanged">
&nbsp;&nbsp;<span title="Download and parse all logs">Check logs: </span>
<input type="checkbox" v-model="checkAllLogs" @change="formChanged">
<br>

<span>Show test longer than, seconds: </span>
<input v-model.number="showTestLongerThan" type="number" @change="formChanged">
</td>
@@ -87,7 +87,7 @@ public void testAllBuildsArePresentInMergedBuilds() {

FullChainRunCtx ctx = bcp.loadFullChainContext(tcIgnited,
entry,
LatestRebuildMode.ALL, ProcessLogsMode.SUITE_NOT_COMPLETE, false, ITeamcity.DEFAULT, SyncMode.NONE, null);
LatestRebuildMode.ALL, ProcessLogsMode.SUITE_NOT_COMPLETE, false, ITeamcity.DEFAULT, SyncMode.NONE, null, null);
List<MultBuildRunCtx> suites = ctx.failedChildSuites().collect(Collectors.toList());

assertTrue(!suites.isEmpty());
@@ -123,7 +123,7 @@ else if (test.getName().equals(TEST_FAILING_EVERY_TIME))

FullChainRunCtx ctx2 = bcp.loadFullChainContext(tcIgnited,
entry,
LatestRebuildMode.ALL, ProcessLogsMode.SUITE_NOT_COMPLETE, false, ITeamcity.DEFAULT, SyncMode.NONE, null);
LatestRebuildMode.ALL, ProcessLogsMode.SUITE_NOT_COMPLETE, false, ITeamcity.DEFAULT, SyncMode.NONE, null, null);
List<MultBuildRunCtx> suites2 = ctx2.failedChildSuites().collect(Collectors.toList());

assertTrue(!suites2.isEmpty());
@@ -153,7 +153,7 @@ public void testAllBuildsArePresentInSingleuilds() {

FullChainRunCtx ctx = bcp.loadFullChainContext(tcIgnitedMock(builds),
entry,
LatestRebuildMode.LATEST, ProcessLogsMode.SUITE_NOT_COMPLETE, false, ITeamcity.DEFAULT, SyncMode.NONE, null);
LatestRebuildMode.LATEST, ProcessLogsMode.SUITE_NOT_COMPLETE, false, ITeamcity.DEFAULT, SyncMode.NONE, null, null);
List<MultBuildRunCtx> suites = ctx.failedChildSuites().collect(Collectors.toList());

assertTrue(!suites.isEmpty());
@@ -121,7 +121,7 @@ public void testTrackedBranchChainsProcessor() {
false,
1,
mock, SyncMode.RELOAD_QUEUED,
false, null, DisplayMode.OnlyFailures, null,
false, null, null, DisplayMode.OnlyFailures, null,
-1);

Gson gson = new GsonBuilder().setPrettyPrinting().create();
@@ -21,5 +21,8 @@ public interface IParameterValueSpec {

String value();

String label();
/**
* @return label or tag, which should be applied to this
*/
public String label();
}

0 comments on commit 1c14eca

Please sign in to comment.