Skip to content

JobRepository#getJobNames() always returns empty list #4229

Closed
@kzander91

Description

@kzander91

Bug description
JobRepository#getJobNames() is not implemented by the only implementation of the interface, SimpleJobRepository. The default method simply returns an empty list.
As of Spring Batch 5, this method is used by JobRepositoryTestUtils.removeJobExecutions(), which became a no-op method, never removing any executions due to getJobNames() never returning any job names.

Environment
Spring Batch 5.0.0-RC2

Steps to reproduce

  1. Run Job.
  2. Call JobRepository.getJobNames().

Expected behavior
Names of jobs are returned.

Minimal Complete Reproducible example
demo1.zip

  1. Unzip
  2. Run mvnw spring-boot:run
  3. The app runs a job named job and then queries both the batch_job_instance table and the JobRepository for all job names. The query returns job as expected, the JobRepository returns nothing.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions