File tree Expand file tree Collapse file tree 2 files changed +4
-12
lines changed
main/java/org/springframework/test/web/servlet
test/java/org/springframework/test/web/servlet Expand file tree Collapse file tree 2 files changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -151,11 +151,11 @@ public Object getAsyncResult(long timeToWait) {
151
151
}
152
152
153
153
/**
154
- * True if is there a latch was not set, or the latch count reached 0 .
154
+ * True if the latch count reached 0 within the specified timeout .
155
155
*/
156
156
private boolean awaitAsyncDispatch (long timeout ) {
157
157
Assert .state (this .asyncDispatchLatch != null ,
158
- "The asynDispatch CountDownLatch was not set by the TestDispatcherServlet.\n " );
158
+ "The asyncDispatch CountDownLatch was not set by the TestDispatcherServlet.\n " );
159
159
try {
160
160
return this .asyncDispatchLatch .await (timeout , TimeUnit .MILLISECONDS );
161
161
}
Original file line number Diff line number Diff line change 13
13
* See the License for the specific language governing permissions and
14
14
* limitations under the License.
15
15
*/
16
+
16
17
package org .springframework .test .web .servlet ;
17
18
18
19
import java .util .concurrent .CountDownLatch ;
19
20
20
- import org .junit .Before ;
21
21
import org .junit .Test ;
22
22
23
23
import org .springframework .mock .web .MockHttpServletRequest ;
24
24
25
- import static org .junit .Assert .*;
26
-
27
25
/**
28
26
* Test fixture for {@link DefaultMvcResult}.
29
27
*
30
28
* @author Rossen Stoyanchev
31
29
*/
32
30
public class DefaultMvcResultTests {
33
31
34
- private DefaultMvcResult mvcResult ;
35
-
36
- @ Before
37
- public void setup () {
38
- MockHttpServletRequest request = new MockHttpServletRequest ();
39
- this .mvcResult = new DefaultMvcResult (request , null );
40
- }
32
+ private final DefaultMvcResult mvcResult = new DefaultMvcResult (new MockHttpServletRequest (), null );
41
33
42
34
@ Test
43
35
public void getAsyncResultSuccess () {
You can’t perform that action at this time.
0 commit comments