diff --git a/pom.xml b/pom.xml
index 9aa37f67..e1c9a5f4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
api
jar
${project.groupId}:${project.artifactId}
- 3.4.8-SNAPSHOT
+ 3.4.9-SNAPSHOT
Hygieia Rest API Layer
https://github.com/Hygieia/api
diff --git a/src/main/java/com/capitalone/dashboard/service/TestResultServiceImpl.java b/src/main/java/com/capitalone/dashboard/service/TestResultServiceImpl.java
index bc30ef13..293dc307 100644
--- a/src/main/java/com/capitalone/dashboard/service/TestResultServiceImpl.java
+++ b/src/main/java/com/capitalone/dashboard/service/TestResultServiceImpl.java
@@ -627,18 +627,20 @@ private TestResult createTestCucumber(CollectorItem collectorItem, CucumberJsonR
}
private void associateBuildToTestResult(String buildUrl, String clientReference, TestResult testResult){
- Build build = buildRepository.findByBuildUrl(buildUrl);
- if(Objects.nonNull(build)){
- build.setClientReference(clientReference);
- testResult.setBuildId(build.getId());
- buildRepository.save(build);
- }else{
- Build baseBuild = new Build();
- baseBuild.setBuildUrl(buildUrl);
- baseBuild.setBuildStatus(BuildStatus.InProgress);
- baseBuild.setClientReference(clientReference);
- baseBuild = buildRepository.save(baseBuild);
- testResult.setBuildId(baseBuild.getId());
+ if(Objects.nonNull(buildUrl)){
+ Build build = buildRepository.findByBuildUrl(buildUrl);
+ if(Objects.nonNull(build)){
+ build.setClientReference(clientReference);
+ testResult.setBuildId(build.getId());
+ buildRepository.save(build);
+ }else{
+ Build baseBuild = new Build();
+ baseBuild.setBuildUrl(buildUrl);
+ baseBuild.setBuildStatus(BuildStatus.InProgress);
+ baseBuild.setClientReference(clientReference);
+ baseBuild = buildRepository.save(baseBuild);
+ testResult.setBuildId(baseBuild.getId());
+ }
}
}