Skip to content
Permalink
Browse files
IGNITE-11896 tests fix after commit: Comment JIRA for case aliased TC…
… is used and comment is called from pr.html
  • Loading branch information
dspavlov committed Jun 5, 2019
1 parent 1bd99a1 commit 9b1d0649263ba1b19e2704c732cbdd93dae6e4f4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
@@ -257,25 +257,25 @@ protected String registerNewIssues(TestFailuresSummary res, ITcBotUserCreds cred
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());

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 @@ protected String registerNewIssues(TestFailuresSummary res, ITcBotUserCreds cred
* 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 @@ private boolean registerSuiteFailIssues(ITeamcityIgnited tcIgnited,
}
}

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 @@ private void locateChanges(ITeamcityIgnited teamcity, int buildId, Issue issue)
}

private boolean registerTestFailIssues(ITeamcityIgnited tcIgnited,
String srvId,
String srvCode,
String normalizeBranch,
TestFailure testFailure,
String trackedBranch,
@@ -416,7 +415,7 @@ private boolean registerTestFailIssues(ITeamcityIgnited tcIgnited,

int buildId = firstFailedBuildId;

IssueKey issueKey = new IssueKey(srvId, buildId, name);
IssueKey issueKey = new IssueKey(srvCode, buildId, name);

if (issuesStorage.containsIssueKey(issueKey))
return false; //duplicate
@@ -103,6 +103,7 @@ public void initBuilds() {
instance.addServer(SRV_ID, apacheBuilds);
}

//todo flaky test
@Test
public void testTestFailureWithoutStatReportedAsBlocker() {
IStringCompactor c = injector.getInstance(IStringCompactor.class);

0 comments on commit 9b1d064

Please sign in to comment.