Skip to content

No Docker Compose file found exception in Spring Unit tests generation #2291

@alisevych

Description

@alisevych

Description

IllegalStateException: No Docker Compose file found in instrumented process logs from SpringAnalyzerProcess.
Spring Unit tests were being generated.

To Reproduce

  1. Install UnitTestBot plugin built from main in IntelliJ IDEA
  2. Open spring-petclinic project
  3. Set JDK 17
  4. Generate tests for Owner entity-class: select PetClinicApplication, Unit tests and leave defaults for all other settings.

Expected behavior

No instrumented process failures are expected.

Actual behavior

IllegalStateException: No Docker Compose file found in instrumented process logs from SpringAnalyzerProcess.

Screenshots, logs

///region Test suites for executable org.springframework.samples.petclinic.owner.Owner.toString

	///region Errors report for toString

	public void testToString_errors() {
		// Couldn't generate some tests. List of errors:
		//
		// 1 occurrences of:
		// <Throwable with empty message>

	}
	///endregion

	///endregion
14:34:53.154 | INFO  | EngineProcessMain         | -----------------------------------------------------------------------
14:34:53.157 | INFO  | EngineProcessMain         | -------------------NEW ENGINE PROCESS STARTED--------------------------
14:34:53.157 | INFO  | EngineProcessMain         | -----------------------------------------------------------------------
14:34:55.260 | INFO  | SpringAnalyzerProcess     | Spring Analyzer process started with PID = 87409
14:34:56.247 | INFO  | SpringAnalyzerProcess     | RdCategory: SpringAnalyzerProcessMain | -----------------------------------------------------------------------
14:34:56.248 | INFO  | SpringAnalyzerProcess     | RdCategory: SpringAnalyzerProcessMain | ------------------NEW SPRING ANALYZER PROCESS STARTED------------------
14:34:56.248 | INFO  | SpringAnalyzerProcess     | RdCategory: SpringAnalyzerProcessMain | -----------------------------------------------------------------------
14:34:56.255 | INFO  | SpringAnalyzerProcess     | RdCategory: SourceFinder              | Using java Spring configuration
14:34:56.258 | INFO  | SpringAnalyzerProcess     | RdCategory: SpringApplicationInstantiatorFacade | Current Java version is: 17.0.6
14:34:56.260 | INFO  | SpringAnalyzerProcess     | RdCategory: SpringApplicationInstantiatorFacade | Current Spring version is: 6.0.9
14:34:56.261 | INFO  | SpringAnalyzerProcess     | RdCategory: SpringApplicationInstantiatorFacade | Current Spring Boot version is: 3.1.0
14:34:56.301 | INFO  | SpringAnalyzerProcess     | RdCategory: SpringApplicationInstantiatorFacade | Instantiating with org.utbot.spring.instantiator.SpringBootApplicationInstantiator@1d8a8c80
14:34:58.175 | INFO  | SpringAnalyzerProcess     | RdCategory: SpringApplication         | Starting application using Java 17.0.6 with PID 87409 (started by alenalisevych in /private/var/folders/3b/hdmt5d356wb48ryz0tg9b13c0000gn/T/UTBot/spring-analyzer2454592816807074907)
14:34:58.176 | INFO  | SpringAnalyzerProcess     | RdCategory: SpringApplication         | The following 1 profile is active: "default"
14:34:58.930 | ERROR | SpringAnalyzerProcess     | RdCategory: SpringApplication         | Application run failed | java.lang.IllegalStateException: No Docker Compose file found in directory '/private/var/folders/3b/hdmt5d356wb48ryz0tg9b13c0000gn/T/UTBot/spring-analyzer2454592816807074907/.'
        at org.springframework.util.Assert.state(Assert.java:97)
        at org.springframework.boot.docker.compose.lifecycle.DockerComposeLifecycleManager.getComposeFile(DockerComposeLifecycleManager.java:135)
        at org.springframework.boot.docker.compose.lifecycle.DockerComposeLifecycleManager.start(DockerComposeLifecycleManager.java:103)
        at org.springframework.boot.docker.compose.lifecycle.DockerComposeListener.onApplicationEvent(DockerComposeListener.java:53)
        at org.springframework.boot.docker.compose.lifecycle.DockerComposeListener.onApplicationEvent(DockerComposeListener.java:35)

Environment

OS - macOS Ventura 13.2.1 (22D68)
IntelliJ IDEA version - 2023.1.2 Community edition
Project - spring-petclinic
JDK - 17

Metadata

Metadata

Assignees

Labels

comp-instrumented-processIssue is related to Instrumented processcomp-springIssue is related to Spring projects supportctg-bugIssue is a bug

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions