- ValidationNexusTestResult vNexusResult = this.getResult(name, version, siloText, timestamp);
- vNexusResults.add(vNexusResult);
- } catch (HttpException ex) {
- LOGGER.warn(EELFLoggerDelegate.auditLogger, "Exception occured while retrieving timestamp results");
+ ValidationDbTestResult vDbResult = dbAdapter.getValidationTestResult(siloText, timestamp);
+ if (vDbResult == null || vDbResult.getDateStorage() == null) {
+ vDbResults.add(this.getResult(name, version, siloText, timestamp));
+ } else {
+ // Just to avoid deletion of already received validation timestamp results
+ vDbResult = new ValidationDbTestResult();
+ Blueprint blueprint = new Blueprint();
+ blueprint.setBlueprintName(name);
+ BlueprintInstance blueInst = new BlueprintInstance();
+ blueInst.setBlueprint(blueprint);
+ blueInst.setVersion(version);
+ vDbResult.setBlueprintInstance(blueInst);
+ LabInfo lab = new LabInfo();
+ lab.setSilo(siloText);
+ vDbResult.setLab(lab);
+ vDbResult.setTimestamp(timestamp);
+ vDbResults.add(vDbResult);
+ }
+ } catch (IllegalArgumentException | HttpException | NullPointerException | NoSuchElementException ex) {
+ LOGGER.warn(EELFLoggerDelegate.auditLogger, "Exception occured while retrieving timestamp : "
+ + timestamp + " result." + UserUtils.getStackTrace(ex));