You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by dp...@apache.org on 2018/11/10 10:21:45 UTC
[ignite-teamcity-bot] 01/02: IGNITE-10190 Failed tests don't count
as blockers (if created in the PR) - Fixes #62.
This is an automated email from the ASF dual-hosted git repository.
dpavlov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git
commit cf804672fde5217ab0f854ce95522b21ca4baf50
Author: Дмитрий Рябов <So...@gmail.com>
AuthorDate: Sat Nov 10 13:00:52 2018 +0300
IGNITE-10190 Failed tests don't count as blockers (if created in the PR) - Fixes #62.
Signed-off-by: Dmitriy Pavlov <dp...@apache.org>
---
.../java/org/apache/ignite/ci/web/model/current/TestFailure.java | 7 +++++--
ignite-tc-helper-web/src/main/webapp/js/testfails-2.1.js | 8 ++++----
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/current/TestFailure.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/current/TestFailure.java
index dbee4f7..c3c28a3 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/current/TestFailure.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/model/current/TestFailure.java
@@ -235,11 +235,14 @@ import static org.apache.ignite.ci.web.model.current.SuiteCurrentStatus.branchFo
* @return {@code True} if this failure is appeared in the current branch.
*/
public boolean isNewFailedTest() {
- FailureSummary recent = histBaseBranch.recent;
-
if (!Strings.isNullOrEmpty(webIssueUrl))
return false;
+ if (histBaseBranch.latestRuns == null)
+ return true;
+
+ FailureSummary recent = histBaseBranch.recent;
+
boolean lowFailureRate = recent != null && recent.failureRate != null &&
Float.valueOf(recent.failureRate.replace(',', '.')) < 4.;
diff --git a/ignite-tc-helper-web/src/main/webapp/js/testfails-2.1.js b/ignite-tc-helper-web/src/main/webapp/js/testfails-2.1.js
index 037a720..8262276 100644
--- a/ignite-tc-helper-web/src/main/webapp/js/testfails-2.1.js
+++ b/ignite-tc-helper-web/src/main/webapp/js/testfails-2.1.js
@@ -693,12 +693,12 @@ function showSuiteData(suite, settings) {
* @returns {boolean} True - if test is new. False - otherwise.
*/
function isNewFailedTest(testFail) {
- if(!isDefinedAndFilled(testFail.histBaseBranch))
- return true;
-
if (isDefinedAndFilled(testFail.webIssueUrl))
return false;
+ if (!isDefinedAndFilled(testFail.histBaseBranch) || !isDefinedAndFilled(testFail.histBaseBranch.latestRuns))
+ return true;
+
var hist = testFail.histBaseBranch;
if (!isDefinedAndFilled(hist.recent))
@@ -995,4 +995,4 @@ function initMoreInfo() {
});
});
});
-}
\ No newline at end of file
+}