Skip to content

Commit

Permalink
fixed while loop entry for xray lock call
Browse files Browse the repository at this point in the history
  • Loading branch information
MathisSenicourt committed Oct 26, 2023
1 parent ddc52b1 commit 52db6b1
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public void createXRayTestExecution(TestCaseExecution execution) {

JSONObject xRayRequest = new JSONObject();

LOG.debug("Calling JIRA XRay TestExecution creation. {}", execution.getId());
LOG.debug("Checking call JIRA XRay TestExecution creation. {}", execution.getId());

if (!StringUtil.isEmpty(execution.getTag())) {
currentTag = tagService.convert(tagService.readByKey(execution.getTag()));
Expand All @@ -169,11 +169,11 @@ public void createXRayTestExecution(TestCaseExecution execution) {
// We lock the tag updating it to PENDING when empty.
if (StringUtil.isEmpty(currentTag.getXRayTestExecution())) {
lock = tagService.lockXRayTestExecution(currentTag.getTag(), currentTag);
LOG.debug("Lock attempt : {}", lock);
LOG.debug("Lock attempt : {} on {}", lock, execution.getId());
}

if (lock == 0) {

currentTag.setXRayTestExecution("PENDING");
int maxIteration = 0;
// We wait that JIRA provide the Epic and Cerberus update it.
while ("PENDING".equals(currentTag.getXRayTestExecution()) && maxIteration++ < 20) {
Expand Down

0 comments on commit 52db6b1

Please sign in to comment.