Skip to content

JobLauncherTestUtils doesn't always launch new job instance because generated job parameters aren't unique [BATCH-2783] #821

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spring-projects-issues opened this issue Jan 11, 2019 · 1 comment
Assignees
Labels
has: backports Legacy label from JIRA. Superseded by "for: backport-to-x.x.x" in: test type: bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Jan 11, 2019

saikatbhadra opened BATCH-2783 and commented

We noticed that our integration tests for a batch job (with many tests) were failing intermittently.  After debugging, I found that JobLauncherTestUtils.launchJob was occasionally relaunching the same job instance. After looking at the code, I saw that a random number generator was being used which does not guarantee that the number generate would be unique. I believe a UUID would be more appropriate as strongly guarantees that an ID does not repeat (except in highly exceptional cases). 

Pull request here: #3701


No further details from BATCH-2783

@spring-projects-issues spring-projects-issues added type: bug status: waiting-for-triage Issues that we did not analyse yet labels Dec 16, 2019
@fmbenhassine fmbenhassine added this to the 4.3.0 milestone Apr 14, 2020
fmbenhassine pushed a commit that referenced this issue May 19, 2020
@fmbenhassine fmbenhassine removed the status: waiting-for-triage Issues that we did not analyse yet label May 19, 2020
fmbenhassine pushed a commit that referenced this issue May 19, 2020
@fmbenhassine
Copy link
Contributor

Resolved with #3701 .

@fmbenhassine fmbenhassine added the has: backports Legacy label from JIRA. Superseded by "for: backport-to-x.x.x" label May 19, 2020
This was referenced May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has: backports Legacy label from JIRA. Superseded by "for: backport-to-x.x.x" in: test type: bug
Projects
None yet
Development

No branches or pull requests

3 participants