Skip to content

Spring integration test post minimization rerun with full context reset takes too long when minimization fails #2625

Closed
@IlyaMuravjov

Description

@IlyaMuravjov

Description

We rerun Spring integration tests after minimization (see #2574 for more context) with full context reset for each test.

However, full context reset is slow, so when minimization outputs too many executions reruns can take too long.

To Reproduce

Generate integration tests for PipelineController.deletePipelineJob() method in Medical-Web-App project with MedicalWebApp configuration.

Expected behavior

Test generation finishes within a reasonable time.

Actual behavior

Generation takes over 50 minute (still not finished for me).

Visual proofs

utbot-engine-current.log

Environment

Setup your environment as described in the Local Development section of the Medical-Web-App project README.

Additional context

PipelineController.deletePipelineJob() is annotated with @PreAuthorize("#username == authentication.principal.username"), which may be the cause of the issue.

When this issue is fixed 50 almost identical tests with empty coverage are generated:

public void testDeletePipelineJobThrowsADE() {
    /* This test fails because method [com.app.medicalwebapp.controllers.PipelineController.deletePipelineJob] produces [org.springframework.security.access.AccessDeniedException: Access is denied] */
    pipelineController.deletePipelineJob(9223372036854513663L);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    comp-minimizerIssue is related to Minimization phasecomp-springIssue is related to Spring projects supportctg-bugIssue is a bugspec-performancePerformance-related issue

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions