ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-9376) Create table with critical failures
Date Thu, 06 Sep 2018 12:55:00 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-9376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16605739#comment-16605739
] 

ASF GitHub Bot commented on IGNITE-9376:
----------------------------------------

SomeFire closed pull request #4: IGNITE-9376 Create table with critical failures
URL: https://github.com/apache/ignite-teamcity-bot/pull/4
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/ignite-tc-helper-web/src/main/webapp/css/style-1.5.css b/ignite-tc-helper-web/src/main/webapp/css/style-1.5.css
index a3262b4..04411da 100644
--- a/ignite-tc-helper-web/src/main/webapp/css/style-1.5.css
+++ b/ignite-tc-helper-web/src/main/webapp/css/style-1.5.css
@@ -24,6 +24,14 @@ table, tr, td {
  	border-spacing: 0px;
 }
 
+.table-title
+{
+	border: solid black;
+	border-width: 1px 0;
+	font-size: 20px;
+	padding: 5px;
+}
+
 .logMsg {
 	font-family: Arial;
 	font-size: 12px;
diff --git a/ignite-tc-helper-web/src/main/webapp/js/testfails-2.0.js b/ignite-tc-helper-web/src/main/webapp/js/testfails-2.0.js
index 83d0200..e363882 100644
--- a/ignite-tc-helper-web/src/main/webapp/js/testfails-2.0.js
+++ b/ignite-tc-helper-web/src/main/webapp/js/testfails-2.0.js
@@ -143,9 +143,11 @@ function showChainCurrentStatusData(server, settings) {
 
     res += "</td></tr>";
 
+    res += addBlockersData(server, settings);
 
     for (var i = 0; i < server.suites.length; i++) {
         var suite = server.suites[i];
+
         res += showSuiteData(suite, settings);
     }
 
@@ -155,6 +157,65 @@ function showChainCurrentStatusData(server, settings) {
     return res;
 }
 
+/**
+ * Creates table with possible blockers.
+ *
+ * @param server - see ChainAtServerCurrentStatus Java class.
+ * @param settings - see Settings JavaScript class.
+ * @returns {string} Table rows with possible blockers and table headers.
+ * Or empty string if no blockers found.
+ */
+function addBlockersData(server, settings) {
+    if (findGetParameter("action") != "Latest")
+        return "";
+
+    var blockers = "";
+
+    for (var i = 0; i < server.suites.length; i++) {
+        var suite = server.suites[i];
+
+        suite = suiteWithCriticalFailuresOnly(suite);
+
+        if (suite != null)
+            blockers += showSuiteData(suite, settings);
+    }
+
+    if (blockers != "") {
+        blockers = "<tr bgcolor='#F5F5FF'><th colspan='4' class='table-title'><b>Possible
Blockers</b></th></tr>" +
+            blockers +
+            "<tr bgcolor='#F5F5FF'><th colspan='4' class='table-title'><b>Other
failures</b></th></tr>";
+    }
+
+    return blockers;
+}
+
+/**
+ * Copy suite and remove flaky tests from the copy.
+ *
+ * @param suite - see SuiteCurrentStatus Java class.
+ * @returns Suite without flaky tests. Or null - if suite have only flaky tests.
+ */
+function suiteWithCriticalFailuresOnly(suite) {
+    var suite0 = Object.assign({}, suite);
+    var j = 0;
+
+    suite0.testFailures = suite0.testFailures.slice();
+
+    while (j < suite0.testFailures.length) {
+        var testFailure = suite0.testFailures[j];
+
+        if (isNewFailedTest(testFailure) || testFailure.name.includes("(last started)"))
+            j++;
+        else
+            suite0.testFailures.splice(j, 1);
+    }
+
+    if (suite0.testFailures.length > 0 || suite0.result != "")
+        return suite0;
+
+    return null;
+}
+
 function triggerBuild(serverId, suiteId, branchName, top) {
     var queueAtTop = isDefinedAndFilled(top) && top;
     $.ajax({
@@ -235,7 +296,13 @@ function triggerBuilds(serverId, suiteIdList, branchName, top) {
     });
 }
 
-//@param suite - see SuiteCurrentStatus
+/**
+ * Create html string with table rows, containing suite data.
+ *
+ * @param suite - see SuiteCurrentStatus Java class.
+ * @param settings - see Settings JavaScript class.
+ * @returns {string} Table rows with suite data.
+ */
 function showSuiteData(suite, settings) {
     var moreInfoTxt = "";
 
@@ -364,7 +431,9 @@ function showSuiteData(suite, settings) {
     res += " </tr>";
 
     for (var i = 0; i < suite.testFailures.length; i++) {
-        res += showTestFailData(suite.testFailures[i], true, settings);
+        var testFailure = suite.testFailures[i];
+
+        res += showTestFailData(testFailure, true, settings);
     }
 
     if (isDefinedAndFilled(suite.webUrlThreadDump)) {
@@ -381,6 +450,16 @@ function showSuiteData(suite, settings) {
     return res;
 }
 
+/**
+ * Check that given test is new.
+ *
+ * @param testFailure - see TestFailure Java class.
+ * @returns {boolean} True - if test is new. False - otherwise.
+ */
+function isNewFailedTest(testFailure) {
+    return Number.parseFloat(testFailure.failureRate) < 4.0 || testFailure.flakyComments
== null;
+}
+
 function failureRateToColor(failureRate) {
     var redSaturation = 255;
     var greenSaturation = 0;


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Create table with critical failures
> -----------------------------------
>
>                 Key: IGNITE-9376
>                 URL: https://issues.apache.org/jira/browse/IGNITE-9376
>             Project: Ignite
>          Issue Type: Sub-task
>            Reporter: Ryabov Dmitrii
>            Assignee: Ryabov Dmitrii
>            Priority: Major
>
> Create separate table for critical failures (suite timouts, suite non-zero exit codes,
etc) and new tests (failure rate 0.0%) on the PR analysis page of TCH.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message