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 2019/07/25 14:56:34 UTC

[ignite-teamcity-bot] branch master updated: NPE fix for trusted tests mode

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


The following commit(s) were added to refs/heads/master by this push:
     new a2e0795  NPE fix for trusted tests mode
a2e0795 is described below

commit a2e07956e73b1373666ba4b4d477917659478b37
Author: Dmitriy Pavlov <dp...@apache.org>
AuthorDate: Thu Jul 25 17:56:25 2019 +0300

    NPE fix for trusted tests mode
---
 .../org/apache/ignite/tcbot/engine/chain/MultBuildRunCtx.java | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/tcbot-engine/src/main/java/org/apache/ignite/tcbot/engine/chain/MultBuildRunCtx.java b/tcbot-engine/src/main/java/org/apache/ignite/tcbot/engine/chain/MultBuildRunCtx.java
index cd5524f..2afa07a 100644
--- a/tcbot-engine/src/main/java/org/apache/ignite/tcbot/engine/chain/MultBuildRunCtx.java
+++ b/tcbot-engine/src/main/java/org/apache/ignite/tcbot/engine/chain/MultBuildRunCtx.java
@@ -642,12 +642,13 @@ public class MultBuildRunCtx implements ISuiteResults {
 
             if (baseBranchStat == null)
                 testWillBeBlockerIfFailed = true;
+            else {
+                float failRate = baseBranchStat.getFailRate();
+                boolean lowFailureRate = failRate * 100.0f < TcBotConst.NON_FLAKY_TEST_FAIL_RATE_BLOCKER_BORDER_PERCENTS;
 
-            float failRate = baseBranchStat.getFailRate();
-            boolean lowFailureRate = failRate * 100.0f < TcBotConst.NON_FLAKY_TEST_FAIL_RATE_BLOCKER_BORDER_PERCENTS;
-
-            if (lowFailureRate && !baseBranchStat.isFlaky())
-                testWillBeBlockerIfFailed = true;
+                if (lowFailureRate && !baseBranchStat.isFlaky())
+                    testWillBeBlockerIfFailed = true;
+            }
 
             if (testWillBeBlockerIfFailed) // this test will be considered as blocker if will fail
                 trustedCnt.addAndGet(1);