diff --git a/indexer/src/main/java/au/org/aodn/esindexer/service/IndexerServiceImpl.java b/indexer/src/main/java/au/org/aodn/esindexer/service/IndexerServiceImpl.java index 7e1184a4..0d1e3dbe 100644 --- a/indexer/src/main/java/au/org/aodn/esindexer/service/IndexerServiceImpl.java +++ b/indexer/src/main/java/au/org/aodn/esindexer/service/IndexerServiceImpl.java @@ -485,7 +485,7 @@ public BulkResponse executeBulk(BulkRequest.Builder bulkRequest, Callback callba protected BulkResponse reduceResponse(BulkResponse in) { List errors = in.items() .stream() - .filter(p -> p.status() != HttpStatus.CREATED.value()) + .filter(p -> p.status() != HttpStatus.CREATED.value() || p.status() != HttpStatus.OK.value()) .toList(); return errors.isEmpty() ? diff --git a/indexer/src/test/java/au/org/aodn/esindexer/service/StacCollectionMapperServiceTests.java b/indexer/src/test/java/au/org/aodn/esindexer/service/StacCollectionMapperServiceTests.java index e6a5674e..ba332ac7 100644 --- a/indexer/src/test/java/au/org/aodn/esindexer/service/StacCollectionMapperServiceTests.java +++ b/indexer/src/test/java/au/org/aodn/esindexer/service/StacCollectionMapperServiceTests.java @@ -324,7 +324,7 @@ public void verifyPolygonMissingDimensionAttributeWorks() throws IOException, JS @Test public void verifyProviderNameNullWorks() throws IOException, JSONException { String xml = readResourceFile("classpath:canned/sample16.xml"); - String expected = readResourceFile("classpath:canned/sample16.json"); + String expected = readResourceFile("classpath:canned/sample16_stac.json"); indexerService.indexMetadata(xml); verify(expected); @@ -333,7 +333,7 @@ public void verifyProviderNameNullWorks() throws IOException, JSONException { @Test public void verifyCiRoleCodeNullWorks() throws IOException, JSONException { String xml = readResourceFile("classpath:canned/sample17.xml"); - String expected = readResourceFile("classpath:canned/sample17.json"); + String expected = readResourceFile("classpath:canned/sample17_stac.json"); indexerService.indexMetadata(xml); verify(expected); diff --git a/indexer/src/test/resources/canned/sample16.json b/indexer/src/test/resources/canned/sample16_stac.json similarity index 100% rename from indexer/src/test/resources/canned/sample16.json rename to indexer/src/test/resources/canned/sample16_stac.json diff --git a/indexer/src/test/resources/canned/sample17.json b/indexer/src/test/resources/canned/sample17_stac.json similarity index 100% rename from indexer/src/test/resources/canned/sample17.json rename to indexer/src/test/resources/canned/sample17_stac.json