Examples of reportPolicyViolations()


Examples of no.kommune.bergen.soa.svarut.util.InvocationRecord.reportPolicyViolations()

  @Test
  public void violateMoreExceptionsThanSuccesses() throws InterruptedException {
    InvocationRecord ir = new InvocationRecord( "testA" );
    ir.addPolicy( new MaxAcceptableFailureRate( .01 ) );
    assertEquals( "", ir.reportPolicyViolations() );
    ir.recordSuccess();
    assertEquals( "", ir.reportPolicyViolations() );
    ir.recordException( "EXCEPTION" );
    assertEquals( "", ir.reportPolicyViolations() );
    ir.recordException( "EXCEPTION" );
View Full Code Here

Examples of no.kommune.bergen.soa.svarut.util.InvocationRecord.reportPolicyViolations()

  public void violateMoreExceptionsThanSuccesses() throws InterruptedException {
    InvocationRecord ir = new InvocationRecord( "testA" );
    ir.addPolicy( new MaxAcceptableFailureRate( .01 ) );
    assertEquals( "", ir.reportPolicyViolations() );
    ir.recordSuccess();
    assertEquals( "", ir.reportPolicyViolations() );
    ir.recordException( "EXCEPTION" );
    assertEquals( "", ir.reportPolicyViolations() );
    ir.recordException( "EXCEPTION" );
    assertTrue( ir.reportPolicyViolations().indexOf( "failure rate bigger" ) > -1 );
  }
View Full Code Here

Examples of no.kommune.bergen.soa.svarut.util.InvocationRecord.reportPolicyViolations()

    ir.addPolicy( new MaxAcceptableFailureRate( .01 ) );
    assertEquals( "", ir.reportPolicyViolations() );
    ir.recordSuccess();
    assertEquals( "", ir.reportPolicyViolations() );
    ir.recordException( "EXCEPTION" );
    assertEquals( "", ir.reportPolicyViolations() );
    ir.recordException( "EXCEPTION" );
    assertTrue( ir.reportPolicyViolations().indexOf( "failure rate bigger" ) > -1 );
  }

  @Test
View Full Code Here

Examples of no.kommune.bergen.soa.svarut.util.InvocationRecord.reportPolicyViolations()

    ir.recordSuccess();
    assertEquals( "", ir.reportPolicyViolations() );
    ir.recordException( "EXCEPTION" );
    assertEquals( "", ir.reportPolicyViolations() );
    ir.recordException( "EXCEPTION" );
    assertTrue( ir.reportPolicyViolations().indexOf( "failure rate bigger" ) > -1 );
  }

  @Test
  public void violateExceptionRate() throws InterruptedException {
    InvocationRecord ir = new InvocationRecord( "testA" );
View Full Code Here

Examples of no.kommune.bergen.soa.svarut.util.InvocationRecord.reportPolicyViolations()

    InvocationRecord ir = new InvocationRecord( "testA" );
    ir.addPolicy( new MaxAcceptableFailureRate( .01 ) );
    for (int i = 0; i < 98; i++) {
      ir.recordSuccess();
    }
    assertEquals( "", ir.reportPolicyViolations() );
    ir.recordException( "EXCEPTION" );
    assertEquals( "", ir.reportPolicyViolations() );
    ir.recordException( "EXCEPTION" );
    assertTrue( ir.reportPolicyViolations().indexOf( "failure rate bigger" ) > -1 );
  }
View Full Code Here

Examples of no.kommune.bergen.soa.svarut.util.InvocationRecord.reportPolicyViolations()

    for (int i = 0; i < 98; i++) {
      ir.recordSuccess();
    }
    assertEquals( "", ir.reportPolicyViolations() );
    ir.recordException( "EXCEPTION" );
    assertEquals( "", ir.reportPolicyViolations() );
    ir.recordException( "EXCEPTION" );
    assertTrue( ir.reportPolicyViolations().indexOf( "failure rate bigger" ) > -1 );
  }
}
View Full Code Here

Examples of no.kommune.bergen.soa.svarut.util.InvocationRecord.reportPolicyViolations()

    }
    assertEquals( "", ir.reportPolicyViolations() );
    ir.recordException( "EXCEPTION" );
    assertEquals( "", ir.reportPolicyViolations() );
    ir.recordException( "EXCEPTION" );
    assertTrue( ir.reportPolicyViolations().indexOf( "failure rate bigger" ) > -1 );
  }
}
View Full Code Here

Examples of no.kommune.bergen.soa.svarut.util.InvocationRecord.reportPolicyViolations()

  @Test
  public void reportPolicyViolations() {
    InvocationRecord ir = new InvocationRecord( "testA" );
    ir.addPolicy( new RecurringFailureLimit( 2 ) );
    assertEquals( "", ir.reportPolicyViolations() );
    ir.recordSuccess();
    ir.recordException( "Shit happens!" );
    ir.recordException( "Shit happens!" );
    assertEquals( "", ir.reportPolicyViolations() );
    ir.recordException( "Shit happens!" );
View Full Code Here

Examples of no.kommune.bergen.soa.svarut.util.InvocationRecord.reportPolicyViolations()

    ir.addPolicy( new RecurringFailureLimit( 2 ) );
    assertEquals( "", ir.reportPolicyViolations() );
    ir.recordSuccess();
    ir.recordException( "Shit happens!" );
    ir.recordException( "Shit happens!" );
    assertEquals( "", ir.reportPolicyViolations() );
    ir.recordException( "Shit happens!" );
    assertTrue( ir.reportPolicyViolations().indexOf( "failed more than" ) > -1 );
    ir.recordSuccess();
    assertEquals( "", ir.reportPolicyViolations() );
    ir.recordException( "Shit happens!" );
View Full Code Here

Examples of no.kommune.bergen.soa.svarut.util.InvocationRecord.reportPolicyViolations()

    ir.recordSuccess();
    ir.recordException( "Shit happens!" );
    ir.recordException( "Shit happens!" );
    assertEquals( "", ir.reportPolicyViolations() );
    ir.recordException( "Shit happens!" );
    assertTrue( ir.reportPolicyViolations().indexOf( "failed more than" ) > -1 );
    ir.recordSuccess();
    assertEquals( "", ir.reportPolicyViolations() );
    ir.recordException( "Shit happens!" );
    assertEquals( "", ir.reportPolicyViolations() );
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.