Examples of notFound()


Examples of net.caprazzi.keez.Keez.Get.notFound()

  public static class GetNotFound implements Answer<Object> {
    @Override
    public Object answer(InvocationOnMock invocation) throws Throwable {
      String key = (String)invocation.getArguments()[0];
      Get cb = (Get) invocation.getArguments()[1];
      cb.notFound(key);
      return null;
    }
  }
 
  public static class GetFound implements Answer<Object> {
View Full Code Here

Examples of org.elasticsearch.action.delete.DeleteResponse.notFound()

        assertThat(Arrays.toString(searchResponse.shardFailures()), searchResponse.failedShards(), equalTo(0));
        assertThat(searchResponse.hits().totalHits(), equalTo(1l));

        // check delete, so all is gone...
        DeleteResponse deleteResponse = client.prepareDelete("test", "type1", "2").execute().actionGet();
        assertThat(deleteResponse.notFound(), equalTo(false));

        // flush, so we fetch it from the index (as see that we filter nested docs)
        client.admin().indices().prepareFlush().setRefresh(true).execute().actionGet();

        statusResponse = client.admin().indices().prepareStatus().execute().actionGet();
View Full Code Here

Examples of org.elasticsearch.action.delete.DeleteResponse.notFound()

        assertThat(response.exists(), equalTo(true));
        assertThat(response.sourceAsMap().get("field1").toString(), equalTo("value1_2"));
        assertThat(response.sourceAsMap().get("field2").toString(), equalTo("value2_2"));

        DeleteResponse deleteResponse = client.prepareDelete("test", "type1", "1").execute().actionGet();
        assertThat(deleteResponse.notFound(), equalTo(false));

        response = client.prepareGet("test", "type1", "1").execute().actionGet();
        assertThat(response.exists(), equalTo(false));
    }
View Full Code Here

Examples of org.elasticsearch.action.delete.DeleteResponse.notFound()

        this.json = json;
    }

    public boolean deleteBySlug(String slug) {
        DeleteResponse deleteResponse = node.client().prepareDelete(INDEX, TYPE, slug).execute().actionGet();
        return !deleteResponse.notFound();
    }

    public Article findBySlug(String slug) {
        GetResponse response = node.client().prepareGet(INDEX, TYPE, slug).execute().actionGet();
        if (response.exists()) {
View Full Code Here

Examples of org.elasticsearch.action.delete.DeleteResponse.notFound()

    String uid = uri.getUID();

    DeleteRequestBuilder deleteRequest = nodeClient.prepareDelete(index, type, uid);
    deleteRequest.setRefresh(true);
    DeleteResponse delete = deleteRequest.execute().actionGet();
    if (delete.notFound()) {
      logger.trace("Document {} to delete was not found", uri);
      return false;
    }

    // Adjust the version information
View Full Code Here

Examples of org.jclouds.openstack.swift.v1.domain.BulkDeleteResponse.notFound()

   public void notPresentWhenDeleting() throws Exception {
      for (String regionId : regions) {
         BulkDeleteResponse deleteResponse = api.bulkApiInRegion(regionId).bulkDelete(
               ImmutableList.of(UUID.randomUUID().toString()));
         assertEquals(deleteResponse.deleted(), 0);
         assertEquals(deleteResponse.notFound(), 1);
         assertTrue(deleteResponse.errors().isEmpty());
      }
   }

   public void extractArchive() throws Exception {
View Full Code Here

Examples of org.jclouds.openstack.swift.v1.domain.BulkDeleteResponse.notFound()

   @Test(dependsOnMethods = "extractArchive")
   public void bulkDelete() throws Exception {
      for (String regionId : regions) {
         BulkDeleteResponse deleteResponse = api.bulkApiInRegion(regionId).bulkDelete(paths);
         assertEquals(deleteResponse.deleted(), OBJECT_COUNT);
         assertEquals(deleteResponse.notFound(), 0);
         assertTrue(deleteResponse.errors().isEmpty());
         assertEquals(api.containerApiInRegion(regionId).get(containerName).objectCount(), 0);
      }
   }
View Full Code Here

Examples of org.jclouds.openstack.swift.v1.domain.BulkDeleteResponse.notFound()

   public void notPresentWhenDeleting() throws Exception {
      for (String regionId : api.configuredRegions()) {
         BulkDeleteResponse deleteResponse = api.bulkApiInRegion(regionId).bulkDelete(
               ImmutableList.of(UUID.randomUUID().toString()));
         assertEquals(deleteResponse.deleted(), 0);
         assertEquals(deleteResponse.notFound(), 1);
         assertTrue(deleteResponse.errors().isEmpty());
      }
   }

   public void extractArchive() throws Exception {
View Full Code Here

Examples of org.jclouds.openstack.swift.v1.domain.BulkDeleteResponse.notFound()

   @Test(dependsOnMethods = "extractArchive")
   public void bulkDelete() throws Exception {
      for (String regionId : api.configuredRegions()) {
         BulkDeleteResponse deleteResponse = api.bulkApiInRegion(regionId).bulkDelete(paths);
         assertEquals(deleteResponse.deleted(), OBJECT_COUNT);
         assertEquals(deleteResponse.notFound(), 0);
         assertTrue(deleteResponse.errors().isEmpty());
         assertEquals(api.containerApiInRegion(regionId).get(containerName).objectCount(), 0);
      }
   }
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.