mirror of https://github.com/apache/jmeter.git
Partly revert "Silence warning of tika about missing sqlite-jdbc dependency"
This reverts commit aa6c7633d6
.
Instead of using a system property and extending the shell scripts to start
JMeter, we now configure Tika inside the client code directly. The used
config file stays at the same location and has still the same content.
This commit is contained in:
parent
aa6c7633d6
commit
803f69f848
|
@ -51,7 +51,7 @@
|
||||||
/bin/*.jmx
|
/bin/*.jmx
|
||||||
/bin/*.jtl
|
/bin/*.jtl
|
||||||
/bin/*.xml
|
/bin/*.xml
|
||||||
# We need log4j2.xml even though we want to exclude xml created by batch tests
|
# We need log4j2.xml and tika-config.xml even though we want to exclude xml created by batch tests
|
||||||
!/bin/log4j2.xml
|
!/bin/log4j2.xml
|
||||||
!/bin/tika-config.xml
|
!/bin/tika-config.xml
|
||||||
|
|
||||||
|
|
|
@ -187,7 +187,7 @@ esac
|
||||||
|
|
||||||
# Always dump on OOM (does not cost anything unless triggered)
|
# Always dump on OOM (does not cost anything unless triggered)
|
||||||
DUMP="-XX:+HeapDumpOnOutOfMemoryError"
|
DUMP="-XX:+HeapDumpOnOutOfMemoryError"
|
||||||
SYSTEM_PROPS="-Djava.security.egd=file:/dev/urandom -Dtika.config=${JMETER_HOME}/bin/tika-config.xml"
|
SYSTEM_PROPS="-Djava.security.egd=file:/dev/urandom"
|
||||||
SERVER="-server"
|
SERVER="-server"
|
||||||
|
|
||||||
if [ -z "${JMETER_COMPLETE_ARGS}" ]; then
|
if [ -z "${JMETER_COMPLETE_ARGS}" ]; then
|
||||||
|
|
|
@ -162,7 +162,7 @@ if not defined GC_ALGO (
|
||||||
set GC_ALGO=-XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:G1ReservePercent=20
|
set GC_ALGO=-XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:G1ReservePercent=20
|
||||||
)
|
)
|
||||||
|
|
||||||
set SYSTEM_PROPS=-Djava.security.egd=file:/dev/urandom -Dtika.config=%JMETER_BIN%tika-config.xml
|
set SYSTEM_PROPS=-Djava.security.egd=file:/dev/urandom
|
||||||
|
|
||||||
rem Always dump on OOM (does not cost anything unless triggered)
|
rem Always dump on OOM (does not cost anything unless triggered)
|
||||||
set DUMP=-XX:+HeapDumpOnOutOfMemoryError
|
set DUMP=-XX:+HeapDumpOnOutOfMemoryError
|
||||||
|
|
|
@ -29,6 +29,7 @@ import java.io.IOException;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.nio.file.Paths;
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
|
@ -104,8 +105,11 @@ import org.apache.jorphan.collections.HashTree;
|
||||||
import org.apache.jorphan.gui.ComponentUtil;
|
import org.apache.jorphan.gui.ComponentUtil;
|
||||||
import org.apache.jorphan.gui.JMeterUIDefaults;
|
import org.apache.jorphan.gui.JMeterUIDefaults;
|
||||||
import org.apache.tika.Tika;
|
import org.apache.tika.Tika;
|
||||||
|
import org.apache.tika.config.TikaConfig;
|
||||||
|
import org.apache.tika.exception.TikaException;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.xml.sax.SAXException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens a popup where user can enter a cURL command line and create a test plan
|
* Opens a popup where user can enter a cURL command line and create a test plan
|
||||||
|
@ -130,7 +134,16 @@ public class ParseCurlCommandAction extends AbstractAction implements MenuCreato
|
||||||
private JSyntaxTextArea cURLCommandTA;
|
private JSyntaxTextArea cURLCommandTA;
|
||||||
private JLabel statusText;
|
private JLabel statusText;
|
||||||
private JCheckBox uploadCookiesCheckBox;
|
private JCheckBox uploadCookiesCheckBox;
|
||||||
private final Tika tika = new Tika();
|
private final Tika tika = createTika();
|
||||||
|
|
||||||
|
private Tika createTika() {
|
||||||
|
try {
|
||||||
|
return new Tika(new TikaConfig(Paths.get(JMeterUtils.getJMeterBinDir(), "tika-config.xml")));
|
||||||
|
} catch (TikaException | IOException | SAXException e) {
|
||||||
|
return new Tika();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public ParseCurlCommandAction() {
|
public ParseCurlCommandAction() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue