ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dpav...@apache.org
Subject [ignite-teamcity-bot] 01/01: IGNITE-9542 Remove unused code, provide separated base/current branch history for PR page
Date Fri, 23 Nov 2018 14:51:46 GMT
This is an automated email from the ASF dual-hosted git repository.

dpavlov pushed a commit to branch ignite-9542
in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git

commit e6bbf11a3adcc96dd9cb73adb8efea0572983d09
Author: Dmitriy Pavlov <dpavlov@apache.org>
AuthorDate: Fri Nov 23 17:51:31 2018 +0300

    IGNITE-9542 Remove unused code, provide separated base/current branch history for PR page
---
 .../apache/ignite/ci/IgnitePersistentTeamcity.java | 37 ++--------------------
 .../java/org/apache/ignite/ci/db/DbMigrations.java |  2 --
 2 files changed, 2 insertions(+), 37 deletions(-)

diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java
index 14795cc..2766db3 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java
@@ -127,8 +127,7 @@ public class IgnitePersistentTeamcity implements IAnalyticsEnabledTeamcity,
ITea
         DbMigrations migrations = new DbMigrations(ignite, conn.serverId());
 
         migrations.dataMigration(
-            this::migrateOccurrencesToLatest,
-                buildsCache(), this::addBuildOccurrenceToFailuresStat,
+            buildsCache(), this::addBuildOccurrenceToFailuresStat,
                 buildsFailureRunStatCache(), testRunStatCache(),
                 visasHistStorage.visas());
     }
@@ -512,40 +511,8 @@ public class IgnitePersistentTeamcity implements IAnalyticsEnabledTeamcity,
ITea
         }, next);
     }
 
-    private void migrateOccurrencesToLatest(TestOccurrences val) {
-        for (TestOccurrence next : val.getTests())
-            migrateTestOneOcurrToAddToLatest(next);
-    }
-
-    private void migrateTestOneOcurrToAddToLatest(TestOccurrence next) {
-        String name = next.getName();
-        if (Strings.isNullOrEmpty(name))
-            return;
-
-        if (next.isMutedTest() || next.isIgnoredTest())
-            return;
-
-        TestInBranch k = new TestInBranch(name, ITeamcity.DEFAULT);
-
-        testRunStatCache().invoke(k, (entry, arguments) -> {
-            TestInBranch key = entry.getKey();
-            TestOccurrence testOccurrence = (TestOccurrence)arguments[0];
-
-            RunStat val = entry.getValue();
-            if (val == null)
-                val = new RunStat(key.name);
-
-            val.addTestRunToLatest(testOccurrence, RunStat.ChangesState.UNKNOWN);
-
-            entry.setValue(val);
-
-            return null;
-        }, next);
-    }
-
     /** {@inheritDoc} */
-    @Override
-    public List<RunStat> topFailingSuite(int cnt) {
+    @Override public List<RunStat> topFailingSuite(int cnt) {
         return CollectionUtil.top(buildsFailureAnalysis(), cnt, Comparator.comparing(RunStat::getFailRate));
     }
 
diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/db/DbMigrations.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/db/DbMigrations.java
index 8ead279..0df6cc2 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/db/DbMigrations.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/db/DbMigrations.java
@@ -42,7 +42,6 @@ import org.apache.ignite.ci.issue.IssuesStorage;
 import org.apache.ignite.ci.observer.CompactBuildsInfo;
 import org.apache.ignite.ci.tcmodel.result.Build;
 import org.apache.ignite.ci.tcmodel.result.stat.Statistics;
-import org.apache.ignite.ci.tcmodel.result.tests.TestOccurrences;
 import org.apache.ignite.ci.web.model.CompactContributionKey;
 import org.apache.ignite.ci.web.model.CompactVisa;
 import org.apache.ignite.ci.web.model.CompactVisaRequest;
@@ -127,7 +126,6 @@ public class DbMigrations {
     }
 
     public void dataMigration(
-        Consumer<TestOccurrences> saveTestToLatest,
         Cache<String, Build> buildCache, Consumer<Build> saveBuildToStat,
         IgniteCache<SuiteInBranch, RunStat> suiteHistCache,
         IgniteCache<TestInBranch, RunStat> testHistCache,


Mime
View raw message