Skip to content

Log context cache statistics in the TestContext framework [SPR-12409] #17017

@spring-projects-issues

Description

@spring-projects-issues

Sam Brannen opened SPR-12409 and commented

Status Quo

The Spring TestContext Framework (TCF) has always cached ApplicationContexts loaded for tests; however, it's always been a bit of a black art knowing (or finding out) exactly how many contexts are loaded within a given test suite.

The information, however, has always been tracked internally within the ContextCache class, and some developers have used reflection to acquire this information. It would therefore be beneficial to many development teams if the context cache statistics were made publicly available, at least as log output.

Deliverables

  1. Log context cache statistics whenever an ApplicationContext is loaded by the TCF.

Affects: 3.0 GA

Referenced from: commits 983ebaf, da04362, a09bc9b, 74500ec

Backported to: 4.0.8, 3.2.12

Metadata

Metadata

Assignees

Labels

in: testIssues in the test modulestatus: backportedAn issue that has been backported to maintenance branchestype: enhancementA general enhancement

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions