Examples of MaxAcceptableFailureRate


Examples of no.kommune.bergen.soa.svarut.util.MaxAcceptableFailureRate

public class MaxAcceptableFailureRateTest {

  @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() );
View Full Code Here

Examples of no.kommune.bergen.soa.svarut.util.MaxAcceptableFailureRate

  }

  @Test
  public void violateExceptionRate() throws InterruptedException {
    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" );
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.