Skip to content

Document wrapping behavior of TestExecutionListener callbacks #34422

Closed
@sbrannen

Description

@sbrannen

Overview

The Javadoc for all "after" callback methods in TestContextManager (such as afterTestExecution()) states the following.

Note that listeners will be executed in the opposite order in which they were registered.

However, most developers would not logically think to read the Javadoc for TestContextManager when trying to reason about TestExecutionListener callbacks.

Therefore, as mentioned by @nizametdinovcrx in #34225 (comment), we should officially document the "wrapping behavior" of TestExecutionListener callbacks, especially with regard to the fact that "after" callbacks are invoked in reverse registration order.

Since I authored the documentation for JUnit Jupiter's Wrapping Behavior of Callbacks, I will likely borrow from that.

Related Issues

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions