Skip to content

Commit

Permalink
try fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
olgakil committed Sep 22, 2020
1 parent fefeb32 commit 96188a2
Showing 1 changed file with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,12 @@ public void runningWithBreakBuild(String issueType) {

try {
TestUtils.runCxFlow(cxFlowRunner, commandBuilder.toString());
cxFlowExecutionException = null;
} catch (Throwable e) {
cxFlowExecutionException = e;
}

cxFlowExecutionException = null;

}

@Then("run should exit with exit code {}")
Expand Down Expand Up @@ -163,17 +164,13 @@ public void runnningScan() {
}

@Then("bug tracker contains {} issues")
public void validateBugTrackerIssues(int countIssues) {
public void validateBugTrackerIssues(int expectedIssuesCount) {

int expectedIssueCount = countIssues;
int actualIssueCount = jiraUtils.getNumberOfIssuesInProject(jiraProperties.getProject());

log.info("comparing expected number of issues: {}, to actual bug tracker issues; {}", expectedIssueCount, actualIssueCount);
if (expectedIssueCount == AT_LEAST_ONE) {
Assert.assertTrue("Expected at least one issue in bug tracker.", actualIssueCount > 0);
} else {
Assert.assertEquals("Wrong issue count in bug tracker.", expectedIssueCount, actualIssueCount);
}
log.info("comparing expected number of issues: {}, to actual bug tracker issues; {}", expectedIssuesCount, actualIssueCount);
Assert.assertEquals("Wrong issue count in bug tracker.", expectedIssuesCount, actualIssueCount);

}


Expand Down

0 comments on commit 96188a2

Please sign in to comment.