Skip to content

Commit 3c1119c

Browse files
committed
[backend] feat(stix): fix tests (#3511)
1 parent bac9d61 commit 3c1119c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

openaev-api/src/test/java/io/openaev/api/stix_process/StixApiTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -956,9 +956,12 @@ void shouldUpdateSecurityCoverageStixModified() throws Exception {
956956
@DisplayName("Should not remove security coverage even if scenario is deleted")
957957
void shouldExistSecurityCoverage() throws Exception {
958958
String scenarioId = getScenarioIdResponse(mapper.writeValueAsString(stixSecurityCoverage));
959+
entityManager.clear();
959960
Scenario scenario = scenarioRepository.findById(scenarioId).orElseThrow();
960961
String securityCoverageId = scenario.getSecurityCoverage().getId();
962+
entityManager.clear();
961963
scenarioRepository.deleteById(scenarioId);
964+
entityManager.clear();
962965
assertThat(securityCoverageRepository.findByExternalId(securityCoverageId)).isNotNull();
963966
}
964967

0 commit comments

Comments
 (0)