Examples of Verifier


Examples of org.apache.helix.TestHelper.Verifier

    for (int i = 0; i < n; i++) {
      String oldSessionId = ZkTestHelper.getSessionId(client);
      ZkTestHelper.simulateZkStateDisconnected(client);
      expectDisconnectCnt.incrementAndGet();
      // wait until we get invoked by zk state change to disconnected
      TestHelper.verify(new Verifier() {

        @Override
        public boolean verify() throws Exception {
          return listener.count == expectDisconnectCnt.get();
        }
      }, 30 * 1000);

      String newSessionId = ZkTestHelper.getSessionId(client);
      Assert.assertEquals(newSessionId, oldSessionId);
    }
    client.unsubscribeStateChanges(listener);
    // make sure participant is NOT disconnected
    LiveInstance liveInstance = accessor.getProperty(keyBuilder.liveInstance(instanceName));
    Assert.assertNotNull(liveInstance, "Live-instance should exist after " + n + " disconnects");

    // trigger flapping
    ZkTestHelper.simulateZkStateDisconnected(client);
    // wait until we get invoked by zk state change to disconnected
    boolean success = TestHelper.verify(new Verifier() {

      @Override
      public boolean verify() throws Exception {
        return client.getShutdownTrigger();
      }
View Full Code Here

Examples of org.apache.helix.TestHelper.Verifier

    for (int i = 0; i < n; i++) {
      String oldSessionId = ZkTestHelper.getSessionId(client);
      ZkTestHelper.simulateZkStateDisconnected(client);
      expectDisconnectCnt.incrementAndGet();
      // wait until we get invoked by zk state change to disconnected
      TestHelper.verify(new Verifier() {

        @Override
        public boolean verify() throws Exception {
          return listener.count == expectDisconnectCnt.get();
        }
      }, 30 * 1000);

      String newSessionId = ZkTestHelper.getSessionId(client);
      Assert.assertEquals(newSessionId, oldSessionId);
    }

    // make sure controller is NOT disconnected
    LiveInstance leader = accessor.getProperty(keyBuilder.controllerLeader());
    Assert.assertNotNull(leader, "Leader should exist after " + n + " disconnects");

    // trigger flapping
    ZkTestHelper.simulateZkStateDisconnected(client);
    // wait until we get invoked by zk state change to disconnected
    boolean success = TestHelper.verify(new Verifier() {

      @Override
      public boolean verify() throws Exception {
        return client.getShutdownTrigger();
      }
View Full Code Here

Examples of org.apache.helix.TestHelper.Verifier

    final HelixDataAccessor accessor =
        new ZKHelixDataAccessor(CLUSTER_NAME, new ZkBaseDataAccessor<ZNRecord>(_gZkClient));
    final PropertyKey.Builder keyBuilder = accessor.keyBuilder();
    final String newControllerName = newController.getInstanceName();
    TestHelper.verify(new Verifier() {

      @Override
      public boolean verify() throws Exception {
        LiveInstance leader = accessor.getProperty(keyBuilder.controllerLeader());
        if (leader == null) {
View Full Code Here

Examples of org.apache.maven.it.Verifier

    public OutputValidator getSubProjectValidator( String subProject )
        throws VerificationException
    {
        final File subFile = getValidator().getSubFile( subProject );
        return new OutputValidator( new Verifier( subFile.getAbsolutePath() ) );
    }
View Full Code Here

Examples of org.apache.maven.it.Verifier

    {
        if ( verifier == null )
        {
            try
            {
                this.verifier = new Verifier( ensureUnpacked().getAbsolutePath() );
            }
            catch ( VerificationException e )
            {
                throw new RuntimeException( e );
            }
View Full Code Here

Examples of org.apache.maven.it.Verifier

   
    public void test()
        throws IOException, URISyntaxException, VerificationException
    {
        File dir = TestUtils.getTestDir( "generate-from-bundle-with-type-and-classifier" );
        Verifier verifier = new Verifier( dir.getAbsolutePath() );
       
        verifier.executeGoal( "generate-resources" );
        verifier.verifyErrorFreeLog();
        verifier.resetStreams();
       
        File output = new File( dir, "target/maven-shared-archive-resources/DEPENDENCIES" );
        String content = FileUtils.fileRead( output );
       
        assertTrue( content.indexOf( "Built-In:" ) > -1 );
View Full Code Here

Examples of org.apache.maven.it.Verifier

        final HttpParams params = httpClient.getParams();
        HttpConnectionParams.setConnectionTimeout( params, getTimeout() );
        HttpConnectionParams.setSoTimeout( params, getTimeout() );

        webappHome = ResourceExtractor.simpleExtractResources( getClass(), "/" + getWarArtifactId() );
        verifier = new Verifier( webappHome.getAbsolutePath() );

        boolean debugVerifier = Boolean.getBoolean( "verifier.maven.debug" );

        verifier.setMavenDebug( debugVerifier );
        verifier.setDebugJvm( Boolean.getBoolean( "verifier.debugJvm" ) );
View Full Code Here

Examples of org.aspectj.apache.bcel.verifier.Verifier

        ConstantClass cc = (ConstantClass) (cp.getConstant(exc_indices[i]));
        checkIndex(cc, cc.getNameIndex(), CONST_Utf8); // cannot be sure this ConstantClass has already been visited (checked)!
        String cname = ((ConstantUtf8) cp.getConstant(cc.getNameIndex())).getBytes().replace('/','.'); //convert internal notation on-the-fly to external notation

        Verifier v = VerifierFactory.getVerifier(cname);
        VerificationResult vr = v.doPass1();

        if (vr != VerificationResult.VR_OK){
          throw new ClassConstraintException("Exceptions attribute '"+tostring(obj)+"' references '"+cname+"' as an Exception but it does not pass verification pass 1: "+vr);
        }
        else{
          // We cannot safely trust any other "instanceof" mechanism. We need to transitively verify
          // the ancestor hierarchy.
          JavaClass e = Repository.lookupClass(cname);
          JavaClass t = Repository.lookupClass(Type.THROWABLE.getClassName());
          JavaClass o = Repository.lookupClass(Type.OBJECT.getClassName());
          while (e != o){
            if (e == t) break; // It's a subclass of Throwable, OKAY, leave.

            v = VerifierFactory.getVerifier(e.getSuperclassName());
            vr = v.doPass1();
            if (vr != VerificationResult.VR_OK){
              throw new ClassConstraintException("Exceptions attribute '"+tostring(obj)+"' references '"+cname+"' as an Exception but '"+e.getSuperclassName()+"' in the ancestor hierachy does not pass verification pass 1: "+vr);
            }
            else{
              e = Repository.lookupClass(e.getSuperclassName());
View Full Code Here

Examples of org.codehaus.groovy.classgen.Verifier

        File file = new File(outputPath, fileName + ".java");
        FileOutputStream fos = new FileOutputStream(file);
        PrintWriter out = new PrintWriter(fos);

        Verifier verifier = new Verifier() {
            public void addCovariantMethods(ClassNode cn) {}
            protected void addTimeStamp(ClassNode node) {}
            protected void addInitialization(ClassNode node) {}
            public void visitProperty(PropertyNode node) {}           
        };
        verifier.visitClass(classNode);
       
        try {
            String packageName = classNode.getPackageName();
            if (packageName != null) {
                out.println("package " + packageName + ";\n");
View Full Code Here

Examples of org.drools.verifier.Verifier

    try {
     
      // create a specialized classloader

      Verifier droolsanalyzer = new Verifier();

      // get the list of files to be added to the rulebase
      String[] fileNames = getFileList();

      for (int i = 0; i < fileNames.length; i++) {
        compileAndAnalyzeFile(droolsanalyzer, fileNames[i]);
      }
     
      droolsanalyzer.fireAnalysis();
      droolsanalyzer.writeComponentsHTML(toFile.getAbsolutePath() + "/");
     
      System.out.println("Writing verifier report to " + toFile.getAbsolutePath() + "/report");
     
    } catch (Exception e) {
      throw new BuildException("RuleBaseTask failed: " + e.getMessage(),
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.