1   package org.apache.maven.surefire.its;
2   
3   
4   import junit.framework.TestCase;
5   import org.apache.maven.it.VerificationException;
6   import org.apache.maven.it.Verifier;
7   import org.apache.maven.it.util.ResourceExtractor;
8   
9   import java.io.File;
10  
11  /**
12   * Test 
13   * 
14   * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
15   * 
16   */
17  public class TimeoutForkedTest
18      extends TestCase
19  {
20      public void testTimeoutForked ()
21          throws Exception
22      {
23          File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/timeout-forked" );
24  
25          Verifier verifier = new Verifier( testDir.getAbsolutePath() );
26  
27          try {
28              verifier.executeGoal( "test" );
29              verifier.verifyErrorFreeLog();
30              fail( "Build didn't fail, but it should have" );
31          } catch (VerificationException e) 
32          {
33              // as expected
34          }
35          finally
36          {
37              verifier.resetStreams();
38          }
39          
40      }
41  }