github-advanced-security[bot] commented on code in PR #1199:
URL: https://github.com/apache/syncope/pull/1199#discussion_r2391952711
##########
core/provisioning-java/src/test/java/org/apache/syncope/core/provisioning/java/job/JobStatusUpdaterTest.java:
##########
@@ -33,24 +32,24 @@
@Transactional
public class JobStatusUpdaterTest extends AbstractTest {
- @Autowired
- private EntityFactory entityFactory;
-
@Autowired
private JobStatusDAO jobStatusDAO;
@Test
public void verifyUpdate() {
String jobName = "job-" + SecureRandomUtils.generateRandomNumber();
- JobStatusUpdater jobStatusUpdater = new JobStatusUpdater(jobStatusDAO,
entityFactory);
+ JobStatusUpdater jobStatusUpdater = new JobStatusUpdater(jobStatusDAO);
jobStatusUpdater.initComplete();
jobStatusUpdater.update(new JobStatusEvent(this,
SyncopeConstants.MASTER_DOMAIN, jobName, "Started"));
- assertTrue(jobStatusDAO.findById(jobName).isPresent());
+ assertEquals(JobStatusDAO.UNKNOWN_STATUS, jobStatusDAO.get(jobName));
+
+ jobStatusDAO.lock(jobName);
Review Comment:
## Unreleased lock
This lock might not be unlocked or might be locked more times than it is
unlocked.
[Show more
details](https://github.com/apache/syncope/security/code-scanning/2305)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]