Skip to content
Permalink
Browse files
Workaround for problem: [TC Bot] Add button for force loading updates…
… from TC
  • Loading branch information
dspavlov committed Aug 6, 2019
1 parent 228526e commit 27e6181fef885a91fe5c579a1a8b27775c93ae1d
Showing 3 changed files with 6 additions and 4 deletions.
@@ -86,7 +86,7 @@ private void addTestInvocation(Integer tName, Invocation invocation) {
/**
* @param suiteInv suite invocation (build) to be added to history (summary).
*/
public void addSuiteInvocation(SuiteInvocation suiteInv) {
private void addSuiteInvocation(SuiteInvocation suiteInv) {
suiteInv.tests().forEach(this::addTestInvocation);

suiteHist.addInvocation(suiteInv.suiteInvocation());
@@ -46,6 +46,7 @@
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.internal.util.GridIntList;
import org.apache.ignite.lang.IgnitePredicate;
import org.apache.ignite.tcbot.common.conf.TcBotSystemProperties;
import org.apache.ignite.tcbot.common.exeption.ExceptionUtil;
import org.apache.ignite.tcbot.common.interceptor.AutoProfiling;
import org.apache.ignite.tcbot.common.interceptor.GuavaCached;
@@ -74,8 +75,9 @@ public class BuildRefDao {
*/
private final com.google.common.cache.Cache<RunHistKey, List<BuildRefCompacted>> buildRefsInMemCache
= CacheBuilder.newBuilder()
.maximumSize(8000)
.maximumSize(Boolean.valueOf(System.getProperty(TcBotSystemProperties.DEV_MODE)) ? 1000 : 8000)
.expireAfterAccess(16, TimeUnit.MINUTES)
.expireAfterWrite(17, TimeUnit.MINUTES) //workaround for stale records
.softValues()
.build();

@@ -101,6 +101,7 @@ public class HistoryCollector {
= CacheBuilder.newBuilder()
.maximumSize(Boolean.valueOf(System.getProperty(TcBotSystemProperties.DEV_MODE)) ? 1000 : 8000)
.expireAfterAccess(16, TimeUnit.MINUTES)
.expireAfterWrite(17, TimeUnit.MINUTES) //workaround for stale records
.softValues()
.build();

@@ -226,8 +227,7 @@ protected SuiteHistory loadSuiteHistory(String srvCode,
int srvId = ITeamcityIgnited.serverIdToInt(srvCode);
Map<Integer, SuiteInvocation> suiteRunHist = histDao.getSuiteRunHist(srvId, buildTypeId, normalizedBaseBranch);

logger.info("***** Found history for suite "
+ compactor.getStringFromId(buildTypeId)
logger.info("***** Found persisted history for suite " + compactor.getStringFromId(buildTypeId)
+ " branch " + compactor.getStringFromId(normalizedBaseBranch) + ": " + suiteRunHist.size() );

Set<Integer> buildIds = determineLatestBuilds(srvId, buildTypeId, normalizedBaseBranch, suiteRunHist.keySet());

0 comments on commit 27e6181

Please sign in to comment.