This is an automated email from the ASF dual-hosted git repository.
dpavlov pushed a commit to branch performance
in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git
The following commit(s) were added to refs/heads/performance by this push:
new 80deaf6 Style changes according to review in PR 14
80deaf6 is described below
commit 80deaf6939d321e624387b7a5c68271bd3cf50e5
Author: Dmitriy Pavlov <[email protected]>
AuthorDate: Wed Sep 19 20:39:53 2018 +0300
Style changes according to review in PR 14
---
.../java/org/apache/ignite/ci/BuildChainProcessor.java | 14 +++++---------
.../src/main/java/org/apache/ignite/ci/TcHelper.java | 4 ++--
.../java/org/apache/ignite/ci/issue/IssueDetector.java | 3 ++-
.../main/java/org/apache/ignite/ci/util/ExceptionUtil.java | 2 +-
.../apache/ignite/ci/web/rest/pr/GetPrTestFailures.java | 2 +-
5 files changed, 11 insertions(+), 14 deletions(-)
diff --git
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/BuildChainProcessor.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/BuildChainProcessor.java
index 8b1e690..fde6b77 100644
---
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/BuildChainProcessor.java
+++
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/BuildChainProcessor.java
@@ -59,7 +59,7 @@ public class BuildChainProcessor {
* @param showContacts Show contacts.
* @param tcAnalytics Tc analytics.
* @param baseBranch Base branch, stable branch to take fail rates from.
- * @param executor
+ * @param executor Executor service to process TC requests in it.
*/
public static Optional<FullChainRunCtx> processBuildChains(
ITeamcity teamcity,
@@ -116,16 +116,12 @@ public class BuildChainProcessor {
.flatMap(ref -> dependencies(teamcity,
ref)).filter(Objects::nonNull)
.filter(ref -> ensureUnique(unique, ref));
-
uniqueBuldsInvolved
- .map((buildRef) -> executor.submit(() -> {
- return replaceWithRecent(teamcity, includeLatestRebuild,
unique, buildRef, entryPoints.size());
- }))
+ .map((buildRef) -> executor.submit(
+ () -> replaceWithRecent(teamcity,
includeLatestRebuild, unique, buildRef, entryPoints.size())))
.map(FutureUtil::getResult)
- .map((s) -> executor.submit(()-> {
- return processBuildList(teamcity, buildsCtxMap, s);
- }
- ))
+ .map((s) -> executor.submit(
+ () -> processBuildList(teamcity, buildsCtxMap, s)))
.forEach(FutureUtil::getResult);
ArrayList<MultBuildRunCtx> contexts = new
ArrayList<>(buildsCtxMap.values());
diff --git
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/TcHelper.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/TcHelper.java
index 624c79e..903df75 100644
--- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/TcHelper.java
+++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/TcHelper.java
@@ -206,7 +206,7 @@ public class TcHelper implements ITcHelper {
* @param srvId Server id.
* @param prov Credentials.
* @param webUrl Build URL.
- * @param executorService
+ * @param executorService Executor service to process TC communication
requests there.
* @return Comment, which should be sent to the JIRA ticket.
*/
private String generateJiraComment(
@@ -215,7 +215,7 @@ public class TcHelper implements ITcHelper {
String srvId,
ICredentialsProv prov,
String webUrl,
- ExecutorService executorService
+ @Nullable ExecutorService executorService
) {
StringBuilder res = new StringBuilder();
TestFailuresSummary summary = GetPrTestFailures.getTestFailuresSummary(
diff --git
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/issue/IssueDetector.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/issue/IssueDetector.java
index a49bd0f..e6b3eb6 100644
---
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/issue/IssueDetector.java
+++
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/issue/IssueDetector.java
@@ -396,7 +396,8 @@ public class IssueDetector {
false,
1,
backgroundOpsTcHelper,
- backgroundOpsCreds, executor);
+ backgroundOpsCreds,
+ executor);
registerIssuesLater(failures, backgroundOpsTcHelper,
backgroundOpsCreds);
}
diff --git
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/util/ExceptionUtil.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/util/ExceptionUtil.java
index 78ea494..f994f20 100644
---
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/util/ExceptionUtil.java
+++
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/util/ExceptionUtil.java
@@ -30,7 +30,7 @@ public class ExceptionUtil {
* @param e Exception.
*/
public static RuntimeException propagateException(Exception e) {
- if(e instanceof InterruptedException)
+ if (e instanceof InterruptedException)
Thread.currentThread().interrupt();
final Optional<Throwable> any = Throwables.getCausalChain(e)
diff --git
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/pr/GetPrTestFailures.java
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/pr/GetPrTestFailures.java
index 4ce4447..fc21717 100644
---
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/pr/GetPrTestFailures.java
+++
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/rest/pr/GetPrTestFailures.java
@@ -133,7 +133,7 @@ public class GetPrTestFailures {
* @param act Action.
* @param cnt Count.
* @param baseBranchForTc Base branch name in TC identification.
- * @param executorService
+ * @param executorService Executor service to process TC communication
requests there.
* @return Test failures summary.
*/
public static TestFailuresSummary getTestFailuresSummary(