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 2020/12/18 11:54:54 UTC
[tika] branch main updated: TIKA-3180 -- git add back files that
were lost during the move
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
The following commit(s) were added to refs/heads/main by this push:
new 954b18e TIKA-3180 -- git add back files that were lost during the move
954b18e is described below
commit 954b18e98f369838dfd75ac2d989022a2d4331de
Author: tallison <ta...@apache.org>
AuthorDate: Fri Dec 18 06:54:18 2020 -0500
TIKA-3180 -- git add back files that were lost during the move
---
.../mock/encrypted_document_exception.xml | 23 +++++++
.../resources/test-documents/mock/fake_oom.xml | 24 +++++++
.../test-documents/mock/heavy_hang_100.xml | 25 ++++++++
.../test-documents/mock/heavy_hang_30000.xml | 25 ++++++++
.../resources/test-documents/mock/hello_world.xml | 25 ++++++++
.../resources/test-documents/mock/null_pointer.xml | 25 ++++++++
.../resources/test-documents/mock/real_oom.xml | 24 +++++++
.../resources/test-documents/mock/system_exit.xml | 25 ++++++++
.../test-documents/mock/testStaticStdOutErr.xml | 75 ++++++++++++++++++++++
.../test-documents/mock/testStdOutErr.xml | 75 ++++++++++++++++++++++
.../test-documents/mock/thread_interrupt.xml | 25 ++++++++
11 files changed, 371 insertions(+)
diff --git a/tika-server/tika-server-core/src/test/resources/test-documents/mock/encrypted_document_exception.xml b/tika-server/tika-server-core/src/test/resources/test-documents/mock/encrypted_document_exception.xml
new file mode 100644
index 0000000..18dabad
--- /dev/null
+++ b/tika-server/tika-server-core/src/test/resources/test-documents/mock/encrypted_document_exception.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<mock>
+ <throw class="org.apache.tika.exception.EncryptedDocumentException">encrypted document exception</throw>
+</mock>
diff --git a/tika-server/tika-server-core/src/test/resources/test-documents/mock/fake_oom.xml b/tika-server/tika-server-core/src/test/resources/test-documents/mock/fake_oom.xml
new file mode 100644
index 0000000..42aa9a7
--- /dev/null
+++ b/tika-server/tika-server-core/src/test/resources/test-documents/mock/fake_oom.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<mock>
+ <metadata action="add" name="author">Nikolai Lobachevsky</metadata>
+ <throw class="java.lang.OutOfMemoryError">oom message</throw>
+</mock>
\ No newline at end of file
diff --git a/tika-server/tika-server-core/src/test/resources/test-documents/mock/heavy_hang_100.xml b/tika-server/tika-server-core/src/test/resources/test-documents/mock/heavy_hang_100.xml
new file mode 100644
index 0000000..b1413bc
--- /dev/null
+++ b/tika-server/tika-server-core/src/test/resources/test-documents/mock/heavy_hang_100.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<mock>
+ <metadata action="add" name="author">Nikolai Lobachevsky</metadata>
+ <write element="p">some content</write>
+ <hang millis="100" heavy="true" pulse_millis="50" />
+</mock>
\ No newline at end of file
diff --git a/tika-server/tika-server-core/src/test/resources/test-documents/mock/heavy_hang_30000.xml b/tika-server/tika-server-core/src/test/resources/test-documents/mock/heavy_hang_30000.xml
new file mode 100644
index 0000000..f1f5b67
--- /dev/null
+++ b/tika-server/tika-server-core/src/test/resources/test-documents/mock/heavy_hang_30000.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<mock>
+ <metadata action="add" name="author">Nikolai Lobachevsky</metadata>
+ <write element="p">some content</write>
+ <hang millis="30000" heavy="true" pulse_millis="100" />
+</mock>
\ No newline at end of file
diff --git a/tika-server/tika-server-core/src/test/resources/test-documents/mock/hello_world.xml b/tika-server/tika-server-core/src/test/resources/test-documents/mock/hello_world.xml
new file mode 100644
index 0000000..e1cb32b
--- /dev/null
+++ b/tika-server/tika-server-core/src/test/resources/test-documents/mock/hello_world.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<mock>
+ <metadata action="add" name="author">Nikolai Lobachevsky</metadata>
+ <metadata action="add" name="title">你好,世界</metadata>
+ <write element="p">hello world</write>
+</mock>
\ No newline at end of file
diff --git a/tika-server/tika-server-core/src/test/resources/test-documents/mock/null_pointer.xml b/tika-server/tika-server-core/src/test/resources/test-documents/mock/null_pointer.xml
new file mode 100644
index 0000000..f4f857a
--- /dev/null
+++ b/tika-server/tika-server-core/src/test/resources/test-documents/mock/null_pointer.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<mock>
+ <metadata action="add" name="author">Nikolai Lobachevsky</metadata>
+ <write element="p">some content</write>
+ <throw class="java.lang.NullPointerException">null pointer message</throw>
+</mock>
diff --git a/tika-server/tika-server-core/src/test/resources/test-documents/mock/real_oom.xml b/tika-server/tika-server-core/src/test/resources/test-documents/mock/real_oom.xml
new file mode 100644
index 0000000..168751a
--- /dev/null
+++ b/tika-server/tika-server-core/src/test/resources/test-documents/mock/real_oom.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<mock>
+ <metadata action="add" name="author">Nikolai Lobachevsky</metadata>
+ <oom/>
+</mock>
\ No newline at end of file
diff --git a/tika-server/tika-server-core/src/test/resources/test-documents/mock/system_exit.xml b/tika-server/tika-server-core/src/test/resources/test-documents/mock/system_exit.xml
new file mode 100644
index 0000000..75d1d3b
--- /dev/null
+++ b/tika-server/tika-server-core/src/test/resources/test-documents/mock/system_exit.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<mock>
+ <metadata action="add" name="author">Nikolai Lobachevsky</metadata>
+ <write element="p">some content</write>
+ <system_exit />
+</mock>
\ No newline at end of file
diff --git a/tika-server/tika-server-core/src/test/resources/test-documents/mock/testStaticStdOutErr.xml b/tika-server/tika-server-core/src/test/resources/test-documents/mock/testStaticStdOutErr.xml
new file mode 100644
index 0000000..f08229e
--- /dev/null
+++ b/tika-server/tika-server-core/src/test/resources/test-documents/mock/testStaticStdOutErr.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<mock>
+
+
+ <!-- action can be "add" or "set" -->
+ <metadata action="add" name="dc:creator">Nikolai Lobachevsky</metadata>
+ <!-- element is the name of the sax event to write, p=paragraph
+ if the element is not specified, the default is <p> -->
+ <hang millis="100" heavy="false" />
+ <write element="p">hello world! </write>
+ <!-- write something to System.out -->
+ <print_out>writing to System.out</print_out>
+ <hang millis="10" heavy="false" />
+ <print_out static="true" random="200000"/>
+ <hang millis="10" heavy="false" />
+ <print_out static="true" random="200000"/>
+ <hang millis="10" heavy="false" />
+ <print_out static="true" random="200000"/>
+ <hang millis="10" heavy="false" />
+ <print_err static="true" random="200000"/>
+ <hang millis="10" heavy="false" />
+ <print_err static="true" random="200000"/>
+ <hang millis="10" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="80" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="70" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="60" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="20" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="10" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="30" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="10" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="10" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="20" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="20" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="30" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="10" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="50" heavy="false" />
+ <!-- write something to System.err -->
+ <print_err>writing to System.err</print_err>
+
+ <write element="p">Even after the calls to Sys.out/err...hello world! the quick brown fox jumped over the lazy dog</write>
+
+</mock>
\ No newline at end of file
diff --git a/tika-server/tika-server-core/src/test/resources/test-documents/mock/testStdOutErr.xml b/tika-server/tika-server-core/src/test/resources/test-documents/mock/testStdOutErr.xml
new file mode 100644
index 0000000..ce0682f
--- /dev/null
+++ b/tika-server/tika-server-core/src/test/resources/test-documents/mock/testStdOutErr.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<mock>
+
+
+ <!-- action can be "add" or "set" -->
+ <metadata action="add" name="dc:creator">Nikolai Lobachevsky</metadata>
+ <!-- element is the name of the sax event to write, p=paragraph
+ if the element is not specified, the default is <p> -->
+ <hang millis="100" heavy="false" />
+ <write element="p">hello world! </write>
+ <!-- write something to System.out -->
+ <print_out>writing to System.out</print_out>
+ <hang millis="10" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="100" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="100" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="100" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="10" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="10" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="80" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="70" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="60" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="20" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="10" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="10" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="1" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="10" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="20" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="20" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="30" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="10" heavy="false" />
+ <print_out>writing to System.out</print_out>
+ <hang millis="50" heavy="false" />
+ <!-- write something to System.err -->
+ <print_err>writing to System.err</print_err>
+
+ <write element="p">Even after the calls to Sys.out/err...hello world! the quick brown fox jumped over the lazy dog</write>
+
+</mock>
\ No newline at end of file
diff --git a/tika-server/tika-server-core/src/test/resources/test-documents/mock/thread_interrupt.xml b/tika-server/tika-server-core/src/test/resources/test-documents/mock/thread_interrupt.xml
new file mode 100644
index 0000000..3e54512
--- /dev/null
+++ b/tika-server/tika-server-core/src/test/resources/test-documents/mock/thread_interrupt.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<mock>
+ <metadata action="add" name="author">Nikolai Lobachevsky</metadata>
+ <write element="p">some content</write>
+ <thread_interrupt />
+</mock>
\ No newline at end of file