Skip to content

Commit 589a04f

Browse files
committed
Add warning to User Guide re: default test instance lifecycle
Issue: #905
1 parent f750c85 commit 589a04f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

documentation/src/docs/asciidoc/writing-tests.adoc

+6
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,12 @@ you can start your JVM with the following system property.
214214

215215
`-Djunit.jupiter.testinstance.lifecycle.default=per_class`
216216

217+
WARNING: Changing the _default_ test instance lifecycle mode can lead to unpredictable
218+
results and fragile builds if not applied consistently. For example, if the build
219+
configures "per-class" semantics as the default but tests in the IDE are executed using
220+
"per-method" semantics, that can make it difficult to debug errors that occur on the
221+
build server.
222+
217223
[[writing-tests-nested]]
218224
=== Nested Tests
219225

0 commit comments

Comments
 (0)