Home / Function/ testSelfReferenceCycle() — spring-boot Function Reference

testSelfReferenceCycle() — spring-boot Function Reference

Architecture documentation for the testSelfReferenceCycle() function in BeanCurrentlyInCreationFailureAnalyzerTests.java from the spring-boot codebase.

Entity Profile

Dependency Diagram

graph TD
  bbdb5dc3_f0dd_a6f2_17bd_865e0840267f["testSelfReferenceCycle()"]
  e3512328_d1bb_71b9_929e_ae0e03cc496c["performAnalysis()"]
  bbdb5dc3_f0dd_a6f2_17bd_865e0840267f -->|calls| e3512328_d1bb_71b9_929e_ae0e03cc496c
  fa1cbc7c_dc65_7706_d08a_c9aadfe5feac["readDescriptionLines()"]
  bbdb5dc3_f0dd_a6f2_17bd_865e0840267f -->|calls| fa1cbc7c_dc65_7706_d08a_c9aadfe5feac
  1a4e5320_a2e2_8aa5_7d05_1e805db190f1["getAction()"]
  bbdb5dc3_f0dd_a6f2_17bd_865e0840267f -->|calls| 1a4e5320_a2e2_8aa5_7d05_1e805db190f1
  style bbdb5dc3_f0dd_a6f2_17bd_865e0840267f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

core/spring-boot/src/test/java/org/springframework/boot/diagnostics/analyzer/BeanCurrentlyInCreationFailureAnalyzerTests.java lines 117–129

	@Test
	void testSelfReferenceCycle() throws IOException {
		FailureAnalysis analysis = performAnalysis(SelfReferenceBeanConfiguration.class);
		List<String> lines = readDescriptionLines(analysis);
		assertThat(lines).hasSize(5);
		assertThat(lines.get(0))
			.isEqualTo("The dependencies of some of the beans in the application context form a cycle:");
		assertThat(lines.get(1)).isEmpty();
		assertThat(lines.get(2)).isEqualTo("┌──->──┐");
		assertThat(lines.get(3)).startsWith("|  bean defined in " + SelfReferenceBeanConfiguration.class.getName());
		assertThat(lines.get(4)).isEqualTo("└──<-──┘");
		assertThat(analysis.getAction()).isNotNull();
	}

Domain

Subdomains

Frequently Asked Questions

What does testSelfReferenceCycle() do?
testSelfReferenceCycle() is a function in the spring-boot codebase.
What does testSelfReferenceCycle() call?
testSelfReferenceCycle() calls 3 function(s): getAction, performAnalysis, readDescriptionLines.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free