[SUREFIRE-1091] Prevent IOExceptions in case a thread tries to write to an already...
[maven-surefire.git] / surefire-integration-tests / src / test / resources / consoleoutput-noisy / src / test / java / consoleoutput_noisy / Test1.java
1 package consoleoutput_noisy;
2
3 /*
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 */
21
22 import org.junit.Test;
23 import org.junit.After;
24 import org.junit.AfterClass;
25 import org.junit.Before;
26 import org.junit.BeforeClass;
27
28 public class Test1
29 {
30
31 public static final int thousand = Integer.parseInt( System.getProperty( "thousand", "1000" ) );
32
33 @Test
34 public void test1MillionBytes()
35 {
36 for ( int i = 0; i < ( 10 * thousand ); i++ )
37 {
38 System.out.println( "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" );
39 }
40 }
41
42 @Test
43 public void testHundredThousand()
44 {
45 printAlot();
46 }
47
48 private static void printAlot()
49 {
50 for ( int i = 0; i < thousand; i++ )
51 {
52 System.out.println( "AAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDDEEEEEEEEEEFFFFFFFFFFGGGGGGGGGGHHHHHHHHHHIIIIIIIIIIJJJJJJJJJJ" );
53 }
54 }
55
56 @Test
57 public void testAnotherHundredThousand()
58 {
59 printAlot();
60 }
61
62 @Before
63 public void before()
64 {
65 printAlot();
66 }
67
68 @BeforeClass
69 public static void beforeClass()
70 {
71 printAlot();
72 }
73
74 @After
75 public void after()
76 {
77 printAlot();
78 }
79
80 @AfterClass
81 public static void afterClass()
82 {
83 printAlot();
84 }
85 }

Copyright 2016, The Apache Software Foundation.