This is an automated email from the ASF dual-hosted git repository.

irakov 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 a3c72c7  Improved flaky test detection to avoid reporting redundant 
messages #173
a3c72c7 is described below

commit a3c72c70b756a6abc014f70962d7ad5a8b61b827
Author: sergeyuttsel <utt...@gmail.com>
AuthorDate: Tue Aug 11 17:47:36 2020 +0300

    Improved flaky test detection to avoid reporting redundant messages #173
    
    Signed-off-by: Ivan Rakov <ivan.glu...@gmail.com>
---
 .../main/java/org/apache/ignite/ci/tcbot/issue/IssueDetector.java  | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

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 fe1ef2b..19b0c26 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
@@ -517,7 +517,12 @@ public class IssueDetector {
 
                     if (flakyRate > cfg.flakyRate()) {
                         type = IssueType.newTestWithHighFlakyRate;
-                        firstFailedBuildId = 
lastInvocations.get(confidenceOkTestsRow).buildId();
+
+                        firstFailedBuildId = lastInvocations.stream()
+                            .filter(invocation -> invocation.status() == 
RES_FAILURE.getCode())
+                            .findFirst()
+                            .orElseGet(() -> 
lastInvocations.get(confidenceOkTestsRow))
+                            .buildId();
                     }
                 }
             }

Reply via email to