Skip to content

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

Closed
@spring-projects-issues

Description

@spring-projects-issues

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

Metadata

Metadata

Assignees

Labels

has: backportsLegacy label from JIRA. Superseded by "for: backport-to-x.x.x"in: testtype: bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions