Package org.hibernate.testing.junit

Examples of org.hibernate.testing.junit.FailureExpected


  }

  @Override
  protected void runTest() throws Throwable {
    Method runMethod = findTestMethod();
    FailureExpected failureExpected = locateAnnotation( FailureExpected.class, runMethod );
    try {
      super.runTest();
      if ( failureExpected != null ) {
        throw new FailureExpectedTestPassedException();
      }
    }
    catch ( FailureExpectedTestPassedException t ) {
      closeResources();
      throw t;
    }
    catch ( Throwable t ) {
      if ( t instanceof InvocationTargetException ) {
        t = ( ( InvocationTargetException ) t ).getTargetException();
      }
      if ( t instanceof IllegalAccessException ) {
        t.fillInStackTrace();
      }
      closeResources();
      if ( failureExpected != null ) {
        StringBuilder builder = new StringBuilder();
        if ( StringHelper.isNotEmpty( failureExpected.message() ) ) {
          builder.append( failureExpected.message() );
        }
        else {
          builder.append( "ignoring @FailureExpected test" );
        }
        builder.append( " (" )
            .append( failureExpected.jiraKey() )
            .append( ")" );
        SkipLog.LOG.warn( builder.toString(), t );
      }
      else {
        throw t;
View Full Code Here


  }

  @Override
  protected void runTest() throws Throwable {
    Method runMethod = findTestMethod();
    FailureExpected failureExpected = locateAnnotation( FailureExpected.class, runMethod );
    try {
      super.runTest();
      if ( failureExpected != null ) {
        throw new FailureExpectedTestPassedException();
      }
    }
    catch ( FailureExpectedTestPassedException t ) {
      closeResources();
      throw t;
    }
    catch ( Throwable t ) {
      if ( t instanceof InvocationTargetException ) {
        t = ( ( InvocationTargetException ) t ).getTargetException();
      }
      if ( t instanceof IllegalAccessException ) {
        t.fillInStackTrace();
      }
      closeResources();
      if ( failureExpected != null ) {
        StringBuilder builder = new StringBuilder();
        if ( StringHelper.isNotEmpty( failureExpected.message() ) ) {
          builder.append( failureExpected.message() );
        }
        else {
          builder.append( "ignoring @FailureExpected test" );
        }
        builder.append( " (" )
            .append( failureExpected.jiraKey() )
            .append( ")" );
                LOG.warn(builder.toString(), t);
      }
      else {
        throw t;
View Full Code Here

  }

  @Override
  protected void runTest() throws Throwable {
    Method runMethod = findTestMethod();
    FailureExpected failureExpected = locateAnnotation( FailureExpected.class, runMethod );
    try {
      super.runTest();
      if ( failureExpected != null ) {
        throw new FailureExpectedTestPassedException();
      }
    }
    catch ( FailureExpectedTestPassedException t ) {
      closeResources();
      throw t;
    }
    catch ( Throwable t ) {
      if ( t instanceof InvocationTargetException ) {
        t = ( ( InvocationTargetException ) t ).getTargetException();
      }
      if ( t instanceof IllegalAccessException ) {
        t.fillInStackTrace();
      }
      closeResources();
      if ( failureExpected != null ) {
        StringBuilder builder = new StringBuilder();
        if ( StringHelper.isNotEmpty( failureExpected.message() ) ) {
          builder.append( failureExpected.message() );
        }
        else {
          builder.append( "ignoring @FailureExpected test" );
        }
        builder.append( " (" )
            .append( failureExpected.jiraKey() )
            .append( ")" );
        SkipLog.LOG.warn( builder.toString(), t );
      }
      else {
        throw t;
View Full Code Here

  }

  @Override
  protected void runTest() throws Throwable {
    Method runMethod = findTestMethod();
    FailureExpected failureExpected = locateAnnotation( FailureExpected.class, runMethod );
    try {
      super.runTest();
      if ( failureExpected != null ) {
        throw new FailureExpectedTestPassedException();
      }
    }
    catch ( FailureExpectedTestPassedException t ) {
      closeResources();
      throw t;
    }
    catch ( Throwable t ) {
      if ( t instanceof InvocationTargetException ) {
        t = ( ( InvocationTargetException ) t ).getTargetException();
      }
      if ( t instanceof IllegalAccessException ) {
        t.fillInStackTrace();
      }
      closeResources();
      if ( failureExpected != null ) {
        StringBuilder builder = new StringBuilder();
        if ( StringHelper.isNotEmpty( failureExpected.message() ) ) {
          builder.append( failureExpected.message() );
        }
        else {
          builder.append( "ignoring @FailureExpected test" );
        }
        builder.append( " (" )
            .append( failureExpected.jiraKey() )
            .append( ")" );
        SkipLog.LOG.warn( builder.toString(), t );
      }
      else {
        throw t;
View Full Code Here

TOP

Related Classes of org.hibernate.testing.junit.FailureExpected

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.