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 2018/11/20 20:20:18 UTC

[tika] branch master updated: TIKA-2785 -- try to fix test that is failing on Linux, but not Windows

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 3b95d85  TIKA-2785 -- try to fix test that is failing on Linux, but not Windows
3b95d85 is described below

commit 3b95d8552a038898a28a8864069a540cebc14323
Author: TALLISON <ta...@apache.org>
AuthorDate: Tue Nov 20 15:20:03 2018 -0500

    TIKA-2785 -- try to fix test that is failing on Linux, but not Windows
---
 .../org/apache/tika/server/TikaServerIntegrationTest.java  | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/tika-server/src/test/java/org/apache/tika/server/TikaServerIntegrationTest.java b/tika-server/src/test/java/org/apache/tika/server/TikaServerIntegrationTest.java
index 7b08ca4..c67129e 100644
--- a/tika-server/src/test/java/org/apache/tika/server/TikaServerIntegrationTest.java
+++ b/tika-server/src/test/java/org/apache/tika/server/TikaServerIntegrationTest.java
@@ -167,11 +167,19 @@ public class TikaServerIntegrationTest extends TikaTest {
             //oom may or may not cause an exception depending
             //on the timing
         }
-        //give some time for the server to crash/kill itself
-        Thread.sleep(2000);
 
         try {
-            testBaseline();
+            response = WebClient
+                    .create(endPoint + META_PATH)
+                    .accept("application/json")
+                    .put(ClassLoader
+                            .getSystemResourceAsStream(TEST_RECURSIVE_DOC));
+            Reader reader = new InputStreamReader((InputStream) response.getEntity(), UTF_8);
+            List<Metadata> metadataList = JsonMetadataList.fromJson(reader);
+            assertEquals(12, metadataList.size());
+            assertEquals("Microsoft Office Word", metadataList.get(0).get(OfficeOpenXMLExtended.APPLICATION));
+            assertContains("plundered our seas", metadataList.get(6).get("X-TIKA:content"));
+
         } finally {
             serverThread.interrupt();
         }