From 5857cef026cc48100e59ad4bbaa961ec4e80c905 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sat, 30 Aug 2014 02:03:47 +0200 Subject: [PATCH] Revise JUnit vs. Spring timeout support in reference manual Prior to this commit, the discussion of JUnit vs. Spring with regard to timeout support in tests erroneously claimed that Spring's support for JUnit's @Test(timeout=...) did not include set up and tear down or repetitions. This information, however, was based on a previous version of SpringJUnit4ClassRunner and is no longer valid. This commit revises the affected section of the testing chapter in the reference manual accordingly. --- src/asciidoc/index.adoc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/asciidoc/index.adoc b/src/asciidoc/index.adoc index 14f1df6083..2ed1bbb552 100644 --- a/src/asciidoc/index.adoc +++ b/src/asciidoc/index.adoc @@ -18940,10 +18940,9 @@ test (see `@Repeat`), as well as any __set up__ or __tear down__ of the test fix Spring's `@Timed` annotation has different semantics than JUnit's `@Test(timeout=...)` support. Specifically, due to the manner in which JUnit handles test execution timeouts (that is, by executing the test method in a separate `Thread`), `@Test(timeout=...)` -applies to __each iteration__ in the case of repetitions and preemptively fails the test -if the test takes too long. Spring's `@Timed`, on the other hand, times the __total__ -test execution time (including all repetitions) and does not preemptively fail the test -but rather waits for the test to complete before failing. +preemptively fails the test if the test takes too long. Spring's `@Timed`, on the other +hand, does not preemptively fail the test but rather waits for the test to complete +before failing. * `@Repeat`