Examples of Failure


Examples of com.sun.enterprise.tools.common.validation.Failure

     * Displays validation failures in a command mode.
     * It systems out the failure messages.
     */
    public void text(Collection collection) {
        Object object = null;
        Failure failure = null;

        if(collection != null){
            Iterator iterator = collection.iterator();
            while(iterator.hasNext()){
                object = iterator.next();
                boolean failureObect = isFailureObject(object);
                if(failureObect){
                    failure = (Failure) object;
                    reportFailure(failure.failureMessage());
                } else {
                    reportError(object);
                }
            }
        }
View Full Code Here

Examples of hudson.model.Failure

    public void doCommitEdit(StaplerRequest req, StaplerResponse rsp) throws Exception {
        PluginImpl.getPlugin().validateAdmin();
        SeleniumGlobalConfiguration conf = req.bindJSON(SeleniumGlobalConfiguration.class, req.getSubmittedForm());
        if (null == conf.getName() || conf.getName().trim().equals("")) {
            throw new Failure("You must specify a name for the configuration");
        }

        PluginImpl.getPlugin().replaceGlobalConfigurations(name, conf);

        rsp.sendRedirect2("../../configurations");
View Full Code Here

Examples of jp.vmi.selenium.selenese.result.Failure

                int timeout = context.getTimeout();
                context.getSubCommandMap().get(WAIT_FOR_PAGE_TO_LOAD).execute(context, Integer.toString(timeout));
            }
            return StringUtils.isNotEmpty(resultString) ? new Success(resultString) : SUCCESS;
        } catch (SeleniumException e) {
            return new Failure(e.getMessage().replaceAll("(\r?\n)+", " / "));
        }
    }
View Full Code Here

Examples of juzu.plugin.less.impl.lesser.Failure

  }

  @Test
  public void testFail() throws Exception {
    URLLessContext context = new URLLessContext(LesserTestCase.class.getClassLoader().getResource("lesser/test/"));
    Failure ret = (Failure)lesser.compile(context, "fail.less");
    LinkedList<LessError> errors = ret.getErrors();
    Assert.assertEquals(1, errors.size());
    LessError error = errors.get(0);
    Assert.assertEquals("fail.less", error.src);
    Assert.assertEquals(1, error.line);
    Assert.assertEquals(8, error.column);
View Full Code Here

Examples of net.sourceforge.marathon.api.Failure

     */
    @Test public void testStandardPythonModulesAreAvailable() throws Exception {
        String[] codeTest = { "def test():", "    import string", "    import re", "    from bdb import Bdb", "    import copy" };
        createScriptAndExecute(TrivialFixture.convertCode(TrivialFixture.codeFixture, codeTest));
        if (result.hasFailure()) {
            Failure failure = result.failures()[0];
            fail("script contained at least one failure <" + failure + ">");
        }
    }
View Full Code Here

Examples of org.apache.cassandra.CassandraServiceController.Failure

        // should be instantly available
        assertColumnEqual("c1", "v1", 0, getColumn(client, key, "Standard1", "c1", ConsistencyLevel.ONE));

        List<InetAddress> endpoints = endpointsForKey(hosts.get(0), key, keyspace);
        InetAddress coordinator = nonEndpointForKey(hosts.get(0), key, keyspace);
        Failure failure = controller.failHosts(endpoints.subList(1, endpoints.size()));

        try {
            client = controller.createClient(coordinator);
            client.set_keyspace(keyspace);

            new Get(client, "Standard1", key).name("c1").value("v1")
                .perform(ConsistencyLevel.ONE);

            new Insert(client, "Standard1", key).name("c3").value("v3")
                .expecting(UnavailableException.class).perform(ConsistencyLevel.ALL);
        } finally {
            failure.resolve();
            Thread.sleep(10000);
        }
    }
View Full Code Here

Examples of org.apache.lucene.store.MockDirectoryWrapper.Failure

        int numDocs = atLeast(2000);
     
        IndexWriter iw = new IndexWriter(dir, conf);

        final Random r = new Random(random().nextLong());
        dir.failOn(new Failure() {
          @Override
          public void eval(MockDirectoryWrapper dir) throws IOException {
            Exception e = new Exception();
            StackTraceElement stack[] = e.getStackTrace();
            boolean ok = false;
View Full Code Here

Examples of org.elasticsearch.action.bulk.BulkItemResponse.Failure

                List<ElasticsearchObject> failures = new ArrayList<ElasticsearchObject>();
                int numberOfSkippedRecords = 0;
                for (int i = 0; i < responses.length; i++) {
                    if (responses[i].isFailed()) {
                        LOG.error("Record failed with message: " + responses[i].getFailureMessage());
                        Failure failure = responses[i].getFailure();
                        if (failure.getMessage().contains("DocumentAlreadyExistsException")
                                || failure.getMessage().contains("VersionConflictEngineException")) {
                            numberOfSkippedRecords++;
                        } else {
                            failures.add(records.get(i));
                        }
                    }
View Full Code Here

Examples of org.gatein.pc.test.unit.Failure

      this.failure = failure;
   }

   public FailureResponse(FailureType type)
   {
      this(new Failure(new Throwable(), type));
   }
View Full Code Here

Examples of org.jboss.resteasy.spi.Failure

         int endOfSegmentIndex = path.indexOf('/', start);
         if (endOfSegmentIndex > -1) simpleSegment = path.substring(start, endOfSegmentIndex);
         else simpleSegment = path.substring(start);
      }

      Failure lastFailure = null;

      SimpleSegment segment = simpleSegments.get(simpleSegment);
      if (segment != null)
      {
         try
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.