NIFI-13734 Removed getTook assertions from Elasticsearch Test (#9254)

This commit is contained in:
David Handermann 2024-09-10 16:21:25 -05:00 committed by GitHub
parent c4d11feda5
commit 1101d4d995
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 14 deletions

View File

@ -427,12 +427,10 @@ class ElasticSearchClientService_IT extends AbstractElasticsearch_IT {
// delete the scroll
DeleteOperationResponse deleteResponse = service.deleteScroll(scrollResponse.getScrollId());
assertNotNull(deleteResponse, "Delete Response was null");
assertTrue(deleteResponse.getTook() > 0);
// delete scroll again (should now be unknown but the 404 caught and ignored)
deleteResponse = service.deleteScroll(scrollResponse.getScrollId());
assertNotNull(deleteResponse, "Delete Response was null");
assertEquals(0L, deleteResponse.getTook());
}
@Test
@ -559,12 +557,10 @@ class ElasticSearchClientService_IT extends AbstractElasticsearch_IT {
// delete pitId
DeleteOperationResponse deleteResponse = service.deletePointInTime(pitId);
assertNotNull(deleteResponse, "Delete Response was null");
assertTrue(deleteResponse.getTook() > 0);
// delete pitId again (should now be unknown but the 404 caught and ignored)
deleteResponse = service.deletePointInTime(pitId);
assertNotNull(deleteResponse, "Delete Response was null");
assertEquals(0L, deleteResponse.getTook());
}
@Test
@ -575,7 +571,6 @@ class ElasticSearchClientService_IT extends AbstractElasticsearch_IT {
.build()).build());
final DeleteOperationResponse response = service.deleteByQuery(query, INDEX, type, null);
assertNotNull(response);
assertTrue(response.getTook() > 0);
}
@Test
@ -588,7 +583,6 @@ class ElasticSearchClientService_IT extends AbstractElasticsearch_IT {
parameters.put("refresh", "true");
final DeleteOperationResponse response = service.deleteByQuery(query, INDEX, type, parameters);
assertNotNull(response);
assertTrue(response.getTook() > 0);
}
@Test
@ -599,7 +593,6 @@ class ElasticSearchClientService_IT extends AbstractElasticsearch_IT {
.build()).build());
final UpdateOperationResponse response = service.updateByQuery(query, INDEX, type, null);
assertNotNull(response);
assertTrue(response.getTook() > 0);
}
@Test
@ -613,7 +606,6 @@ class ElasticSearchClientService_IT extends AbstractElasticsearch_IT {
parameters.put("slices", "1");
final UpdateOperationResponse response = service.updateByQuery(query, INDEX, type, parameters);
assertNotNull(response);
assertTrue(response.getTook() > 0);
}
@Test
@ -623,7 +615,6 @@ class ElasticSearchClientService_IT extends AbstractElasticsearch_IT {
try {
final DeleteOperationResponse response = service.deleteById(INDEX, type, ID, null);
assertNotNull(response);
assertTrue(response.getTook() > 0);
final ElasticsearchException ee = assertThrows(ElasticsearchException.class, () ->
service.get(INDEX, type, ID, null));
assertTrue(ee.isNotFound());
@ -755,7 +746,6 @@ class ElasticSearchClientService_IT extends AbstractElasticsearch_IT {
null
);
assertNotNull(response);
assertTrue(response.getTook() > 0);
waitForIndexRefresh();
Map<String, Object> result = service.get("nulls", type, "1", null);
@ -765,7 +755,6 @@ class ElasticSearchClientService_IT extends AbstractElasticsearch_IT {
suppressNulls(true);
response = service.bulk(Collections.singletonList(new IndexOperationRequest("nulls", type, "2", doc, IndexOperationRequest.Operation.Index, null, false, null, null)), null);
assertNotNull(response);
assertTrue(response.getTook() > 0);
waitForIndexRefresh();
result = service.get("nulls", type, "2", null);
@ -801,7 +790,6 @@ class ElasticSearchClientService_IT extends AbstractElasticsearch_IT {
}
final IndexOperationResponse response = service.bulk(payload, createParameters("refresh", "true"));
assertNotNull(response);
assertTrue(response.getTook() > 0);
waitForIndexRefresh();
/*
@ -839,7 +827,6 @@ class ElasticSearchClientService_IT extends AbstractElasticsearch_IT {
}
final IndexOperationResponse response = service.bulk(payload, createParameters("refresh", "true"));
assertNotNull(response);
assertTrue(response.getTook() > 0);
/*
* Now, check to ensure that all indices got populated and refreshed appropriately.
@ -882,7 +869,6 @@ class ElasticSearchClientService_IT extends AbstractElasticsearch_IT {
final IndexOperationResponse response = service.bulk(payload, createParameters("refresh", "true"));
assertNotNull(response);
assertTrue(response.getTook() > 0);
/*
* Now, check the dynamic_template was applied