You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tika.apache.org by ta...@apache.org on 2021/09/14 14:37:40 UTC

[tika] 01/06: Fix deleteById bug... should be deleteByQuery

This is an automated email from the ASF dual-hosted git repository.

tallison pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tika.git

commit c8b204bd17138422226a9e0f8f3116478e6c326e
Author: tballison <ta...@apache.org>
AuthorDate: Tue Sep 14 09:48:35 2021 -0400

    Fix deleteById bug... should be deleteByQuery
---
 .../org/apache/tika/pipes/solr/tests/TikaPipesSolrTestBase.java  | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/tika-integration-tests/tika-pipes-solr-integration-tests/src/test/java/org/apache/tika/pipes/solr/tests/TikaPipesSolrTestBase.java b/tika-integration-tests/tika-pipes-solr-integration-tests/src/test/java/org/apache/tika/pipes/solr/tests/TikaPipesSolrTestBase.java
index 76278e5..e99ac70 100644
--- a/tika-integration-tests/tika-pipes-solr-integration-tests/src/test/java/org/apache/tika/pipes/solr/tests/TikaPipesSolrTestBase.java
+++ b/tika-integration-tests/tika-pipes-solr-integration-tests/src/test/java/org/apache/tika/pipes/solr/tests/TikaPipesSolrTestBase.java
@@ -16,8 +16,6 @@
  */
 package org.apache.tika.pipes.solr.tests;
 
-import static org.junit.jupiter.api.Assumptions.assumeTrue;
-
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
@@ -42,7 +40,6 @@ import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
 import org.testcontainers.containers.GenericContainer;
 import org.testcontainers.shaded.org.apache.commons.io.FileUtils;
 import org.testcontainers.utility.DockerImageName;
@@ -187,8 +184,10 @@ public abstract class TikaPipesSolrTestBase {
             }
             //clean up test-embedded.docx so that the iterator won't try to update its children
             //in the next test
-            solrClient.deleteById(collection, "_root_:\"test-embedded.docx\"");
-            solrClient.commit(collection);
+
+            solrClient.deleteByQuery(collection, "_root_:\"test-embedded.docx\"");
+
+            solrClient.commit(collection, true, true);
         }