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/06/05 13:28:14 UTC

[ignite-teamcity-bot] branch master updated: IGNITE-11896 tests fix after commit: Comment JIRA for case aliased TC is used and comment is called from pr.html

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 9b1d064  IGNITE-11896 tests fix after commit: Comment JIRA for case aliased TC is used and comment is called from pr.html
9b1d064 is described below

commit 9b1d0649263ba1b19e2704c732cbdd93dae6e4f4
Author: Dmitriy Pavlov <dp...@apache.org>
AuthorDate: Wed Jun 5 16:28:06 2019 +0300

    IGNITE-11896 tests fix after commit: Comment JIRA for case aliased TC is used and comment is called from pr.html
---
 .../apache/ignite/ci/tcbot/issue/IssueDetector.java | 21 ++++++++++-----------
 .../ci/tcbot/chain/PrChainsProcessorTest.java       |  1 +
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/issue/IssueDetector.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/issue/IssueDetector.java
index 373aa0d..4119c66 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/issue/IssueDetector.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/tcbot/issue/IssueDetector.java
@@ -257,12 +257,12 @@ public class IssueDetector {
         int newIssues = 0;
 
         for (ChainAtServerCurrentStatus next : res.servers) {
-            String srvId = next.serverId;
+            String srvCode = next.serverCode;
 
-            if (!tcProv.hasAccess(srvId, creds))
+            if (!tcProv.hasAccess(srvCode, creds))
                 continue;
 
-            ITeamcityIgnited tcIgnited = tcProv.server(srvId, creds);
+            ITeamcityIgnited tcIgnited = tcProv.server(srvCode, creds);
 
             for (SuiteCurrentStatus suiteCurrentStatus : next.suites) {
                 String normalizeBranch = normalizeBranch(suiteCurrentStatus.branchName());
@@ -270,12 +270,12 @@ public class IssueDetector {
                 final String trackedBranch = res.getTrackedBranch();
 
                 for (TestFailure testFailure : suiteCurrentStatus.testFailures) {
-                    if (registerTestFailIssues(tcIgnited, srvId, normalizeBranch, testFailure, trackedBranch,
+                    if (registerTestFailIssues(tcIgnited, srvCode, normalizeBranch, testFailure, trackedBranch,
                         suiteCurrentStatus.tags))
                         newIssues++;
                 }
 
-                if (registerSuiteFailIssues(tcIgnited, srvId, normalizeBranch, suiteCurrentStatus, trackedBranch))
+                if (registerSuiteFailIssues(tcIgnited, srvCode, normalizeBranch, suiteCurrentStatus, trackedBranch))
                     newIssues++;
             }
         }
@@ -287,7 +287,7 @@ public class IssueDetector {
      * Checks and persists suites failure.
      *
      * @param tcIgnited Tc ignited.
-     * @param srvCode Server code.
+     * @param srvCode Servers (services) code.
      * @param normalizeBranch Normalize branch.
      * @param suiteFailure Suite failure.
      * @param trackedBranch Tracked branch.
@@ -320,9 +320,8 @@ public class IssueDetector {
             }
         }
 
-        ITcServerConfig tcCfg = cfg.getTeamcityConfig(srvCode);
-
-        if (tcCfg.trustedSuites().contains(suiteId)) {
+        if (cfg.getTeamcityConfig(srvCode).trustedSuites().contains(suiteId)
+            || tcIgnited.config().trustedSuites().contains(suiteId)) {
             Integer firstTrustedSuiteFailue = runStat.detectTemplate(EventTemplates.newFailure);
 
             if (firstTrustedSuiteFailue != null) {
@@ -369,7 +368,7 @@ public class IssueDetector {
     }
 
     private boolean registerTestFailIssues(ITeamcityIgnited tcIgnited,
-        String srvId,
+        String srvCode,
         String normalizeBranch,
         TestFailure testFailure,
         String trackedBranch,
@@ -416,7 +415,7 @@ public class IssueDetector {
 
         int buildId = firstFailedBuildId;
 
-        IssueKey issueKey = new IssueKey(srvId, buildId, name);
+        IssueKey issueKey = new IssueKey(srvCode, buildId, name);
 
         if (issuesStorage.containsIssueKey(issueKey))
             return false; //duplicate
diff --git a/ignite-tc-helper-web/src/test/java/org/apache/ignite/ci/tcbot/chain/PrChainsProcessorTest.java b/ignite-tc-helper-web/src/test/java/org/apache/ignite/ci/tcbot/chain/PrChainsProcessorTest.java
index 50df573..22a9d9b 100644
--- a/ignite-tc-helper-web/src/test/java/org/apache/ignite/ci/tcbot/chain/PrChainsProcessorTest.java
+++ b/ignite-tc-helper-web/src/test/java/org/apache/ignite/ci/tcbot/chain/PrChainsProcessorTest.java
@@ -103,6 +103,7 @@ public class PrChainsProcessorTest {
         instance.addServer(SRV_ID, apacheBuilds);
     }
 
+    //todo flaky test
     @Test
     public void testTestFailureWithoutStatReportedAsBlocker() {
         IStringCompactor c = injector.getInstance(IStringCompactor.class);