mirror of https://github.com/apache/jmeter.git
test: use bin/temp/ftp_test instead of bin/ftp_test so the generated files are not accidentally committed
This commit is contained in:
parent
be645a23c5
commit
8d629f196d
|
|
@ -82,12 +82,12 @@ import org.apache.commons.io.FileUtils;
|
|||
import org.apache.ftpserver.DataConnectionConfiguration;
|
||||
import org.apache.ftpserver.DataConnectionConfigurationFactory;
|
||||
|
||||
FileUtils.deleteDirectory(new File(JMeterUtils.getJMeterHome(), "bin/ftp_test"));
|
||||
new File(JMeterUtils.getJMeterHome(), "bin/ftp_test").mkdir();
|
||||
FileUtils.deleteDirectory(new File(JMeterUtils.getJMeterHome(), "bin/temp/ftp_test"));
|
||||
new File(JMeterUtils.getJMeterHome(), "bin/temp/ftp_test").mkdirs();
|
||||
|
||||
DataConnectionConfigurationFactory dataConnectionConfigurationFactory =
|
||||
DataConnectionConfigurationFactory dataConnectionConfigurationFactory =
|
||||
new DataConnectionConfigurationFactory();
|
||||
dataConnectionConfigurationFactory.setPassivePorts(vars.get("passivePort"));
|
||||
dataConnectionConfigurationFactory.setPassivePorts(vars.get("passivePort"));
|
||||
DataConnectionConfiguration dataConnectionConfiguration = dataConnectionConfigurationFactory.createDataConnectionConfiguration();
|
||||
|
||||
PropertiesUserManagerFactory userManagerFactory = new PropertiesUserManagerFactory();
|
||||
|
|
@ -107,7 +107,7 @@ listenerFactory.setPort(Integer.parseInt(vars.get("port")));
|
|||
FtpServerFactory factory = new FtpServerFactory();
|
||||
factory.setUserManager(userManager);
|
||||
factory.addListener("default", listenerFactory.createListener());
|
||||
|
||||
|
||||
FtpServer server = factory.createServer();
|
||||
server.start();
|
||||
|
||||
|
|
@ -145,7 +145,7 @@ props.put("FTP_SERVER", server);
|
|||
<stringProp name="FTPSampler.server"></stringProp>
|
||||
<stringProp name="FTPSampler.port"></stringProp>
|
||||
<stringProp name="FTPSampler.filename">jmeter.properties</stringProp>
|
||||
<stringProp name="FTPSampler.localfilename">ftp_test/jmeter-from-ftp-binary.properties</stringProp>
|
||||
<stringProp name="FTPSampler.localfilename">temp/ftp_test/jmeter-from-ftp-binary.properties</stringProp>
|
||||
<stringProp name="FTPSampler.inputdata"></stringProp>
|
||||
<boolProp name="FTPSampler.binarymode">true</boolProp>
|
||||
<boolProp name="FTPSampler.saveresponse">true</boolProp>
|
||||
|
|
@ -168,7 +168,7 @@ props.put("FTP_SERVER", server);
|
|||
<stringProp name="FTPSampler.server"></stringProp>
|
||||
<stringProp name="FTPSampler.port"></stringProp>
|
||||
<stringProp name="FTPSampler.filename">jmeter.properties</stringProp>
|
||||
<stringProp name="FTPSampler.localfilename">ftp_test/jmeter-from-ftp-ascii.properties</stringProp>
|
||||
<stringProp name="FTPSampler.localfilename">temp/ftp_test/jmeter-from-ftp-ascii.properties</stringProp>
|
||||
<stringProp name="FTPSampler.inputdata"></stringProp>
|
||||
<boolProp name="FTPSampler.binarymode">false</boolProp>
|
||||
<boolProp name="FTPSampler.saveresponse">true</boolProp>
|
||||
|
|
@ -190,8 +190,8 @@ props.put("FTP_SERVER", server);
|
|||
<FTPSampler guiclass="FtpTestSamplerGui" testclass="FTPSampler" testname="FTP Request-put-text" enabled="true">
|
||||
<stringProp name="FTPSampler.server"></stringProp>
|
||||
<stringProp name="FTPSampler.port"></stringProp>
|
||||
<stringProp name="FTPSampler.filename">ftp_test/jmeter-from-ftp-ascii-write.properties</stringProp>
|
||||
<stringProp name="FTPSampler.localfilename">ftp_test/jmeter-from-ftp-ascii.properties</stringProp>
|
||||
<stringProp name="FTPSampler.filename">temp/ftp_test/jmeter-from-ftp-ascii-write.properties</stringProp>
|
||||
<stringProp name="FTPSampler.localfilename">temp/ftp_test/jmeter-from-ftp-ascii.properties</stringProp>
|
||||
<stringProp name="FTPSampler.inputdata"></stringProp>
|
||||
<boolProp name="FTPSampler.binarymode">false</boolProp>
|
||||
<boolProp name="FTPSampler.saveresponse">true</boolProp>
|
||||
|
|
@ -203,8 +203,8 @@ props.put("FTP_SERVER", server);
|
|||
<FTPSampler guiclass="FtpTestSamplerGui" testclass="FTPSampler" testname="FTP Request-check-upload" enabled="true">
|
||||
<stringProp name="FTPSampler.server"></stringProp>
|
||||
<stringProp name="FTPSampler.port"></stringProp>
|
||||
<stringProp name="FTPSampler.filename">ftp_test/jmeter-from-ftp-ascii-write.properties</stringProp>
|
||||
<stringProp name="FTPSampler.localfilename">ftp_test/jmeter-from-ftp-ascii-write-tocheck.properties</stringProp>
|
||||
<stringProp name="FTPSampler.filename">temp/ftp_test/jmeter-from-ftp-ascii-write.properties</stringProp>
|
||||
<stringProp name="FTPSampler.localfilename">temp/ftp_test/jmeter-from-ftp-ascii-write-tocheck.properties</stringProp>
|
||||
<stringProp name="FTPSampler.inputdata"></stringProp>
|
||||
<boolProp name="FTPSampler.binarymode">false</boolProp>
|
||||
<boolProp name="FTPSampler.saveresponse">true</boolProp>
|
||||
|
|
@ -248,7 +248,7 @@ import org.apache.commons.io.FileUtils;
|
|||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
|
||||
FileUtils.deleteDirectory(new File(JMeterUtils.getJMeterHome(), "bin/ftp_test"));
|
||||
FileUtils.deleteDirectory(new File(JMeterUtils.getJMeterHome(), "bin/temp/ftp_test"));
|
||||
|
||||
FtpServer server = (FtpServer) props.get("FTP_SERVER");
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in New Issue