@@ -82,12 +82,12 @@ import org.apache.commons.io.FileUtils;
8282import org.apache.ftpserver.DataConnectionConfiguration;
8383import org.apache.ftpserver.DataConnectionConfigurationFactory;
8484
85- FileUtils.deleteDirectory(new File(JMeterUtils.getJMeterHome(), " bin/ftp_test" ));
86- new File(JMeterUtils.getJMeterHome(), " bin/ftp_test" ).mkdir ();
85+ FileUtils.deleteDirectory(new File(JMeterUtils.getJMeterHome(), " bin/temp/ ftp_test" ));
86+ new File(JMeterUtils.getJMeterHome(), " bin/temp/ ftp_test" ).mkdirs ();
8787
88- DataConnectionConfigurationFactory dataConnectionConfigurationFactory =
88+ DataConnectionConfigurationFactory dataConnectionConfigurationFactory =
8989 new DataConnectionConfigurationFactory();
90- dataConnectionConfigurationFactory.setPassivePorts(vars.get(" passivePort" ));
90+ dataConnectionConfigurationFactory.setPassivePorts(vars.get(" passivePort" ));
9191DataConnectionConfiguration dataConnectionConfiguration = dataConnectionConfigurationFactory.createDataConnectionConfiguration();
9292
9393PropertiesUserManagerFactory userManagerFactory = new PropertiesUserManagerFactory();
@@ -107,7 +107,7 @@ listenerFactory.setPort(Integer.parseInt(vars.get("port")));
107107FtpServerFactory factory = new FtpServerFactory();
108108factory.setUserManager(userManager);
109109factory.addListener(" default" , listenerFactory.createListener());
110-
110+
111111FtpServer server = factory.createServer();
112112server.start();
113113
@@ -145,7 +145,7 @@ props.put("FTP_SERVER", server);
145145 <stringProp name =" FTPSampler.server" ></stringProp >
146146 <stringProp name =" FTPSampler.port" ></stringProp >
147147 <stringProp name =" FTPSampler.filename" >jmeter.properties</stringProp >
148- <stringProp name =" FTPSampler.localfilename" >ftp_test/jmeter-from-ftp-binary.properties</stringProp >
148+ <stringProp name =" FTPSampler.localfilename" >temp/ ftp_test/jmeter-from-ftp-binary.properties</stringProp >
149149 <stringProp name =" FTPSampler.inputdata" ></stringProp >
150150 <boolProp name =" FTPSampler.binarymode" >true</boolProp >
151151 <boolProp name =" FTPSampler.saveresponse" >true</boolProp >
@@ -168,7 +168,7 @@ props.put("FTP_SERVER", server);
168168 <stringProp name =" FTPSampler.server" ></stringProp >
169169 <stringProp name =" FTPSampler.port" ></stringProp >
170170 <stringProp name =" FTPSampler.filename" >jmeter.properties</stringProp >
171- <stringProp name =" FTPSampler.localfilename" >ftp_test/jmeter-from-ftp-ascii.properties</stringProp >
171+ <stringProp name =" FTPSampler.localfilename" >temp/ ftp_test/jmeter-from-ftp-ascii.properties</stringProp >
172172 <stringProp name =" FTPSampler.inputdata" ></stringProp >
173173 <boolProp name =" FTPSampler.binarymode" >false</boolProp >
174174 <boolProp name =" FTPSampler.saveresponse" >true</boolProp >
@@ -190,8 +190,8 @@ props.put("FTP_SERVER", server);
190190 <FTPSampler guiclass =" FtpTestSamplerGui" testclass =" FTPSampler" testname =" FTP Request-put-text" enabled =" true" >
191191 <stringProp name =" FTPSampler.server" ></stringProp >
192192 <stringProp name =" FTPSampler.port" ></stringProp >
193- <stringProp name =" FTPSampler.filename" >ftp_test/jmeter-from-ftp-ascii-write.properties</stringProp >
194- <stringProp name =" FTPSampler.localfilename" >ftp_test/jmeter-from-ftp-ascii.properties</stringProp >
193+ <stringProp name =" FTPSampler.filename" >temp/ ftp_test/jmeter-from-ftp-ascii-write.properties</stringProp >
194+ <stringProp name =" FTPSampler.localfilename" >temp/ ftp_test/jmeter-from-ftp-ascii.properties</stringProp >
195195 <stringProp name =" FTPSampler.inputdata" ></stringProp >
196196 <boolProp name =" FTPSampler.binarymode" >false</boolProp >
197197 <boolProp name =" FTPSampler.saveresponse" >true</boolProp >
@@ -203,8 +203,8 @@ props.put("FTP_SERVER", server);
203203 <FTPSampler guiclass =" FtpTestSamplerGui" testclass =" FTPSampler" testname =" FTP Request-check-upload" enabled =" true" >
204204 <stringProp name =" FTPSampler.server" ></stringProp >
205205 <stringProp name =" FTPSampler.port" ></stringProp >
206- <stringProp name =" FTPSampler.filename" >ftp_test/jmeter-from-ftp-ascii-write.properties</stringProp >
207- <stringProp name =" FTPSampler.localfilename" >ftp_test/jmeter-from-ftp-ascii-write-tocheck.properties</stringProp >
206+ <stringProp name =" FTPSampler.filename" >temp/ ftp_test/jmeter-from-ftp-ascii-write.properties</stringProp >
207+ <stringProp name =" FTPSampler.localfilename" >temp/ ftp_test/jmeter-from-ftp-ascii-write-tocheck.properties</stringProp >
208208 <stringProp name =" FTPSampler.inputdata" ></stringProp >
209209 <boolProp name =" FTPSampler.binarymode" >false</boolProp >
210210 <boolProp name =" FTPSampler.saveresponse" >true</boolProp >
@@ -248,7 +248,7 @@ import org.apache.commons.io.FileUtils;
248248import org.apache.commons.io.FileUtils;
249249
250250
251- FileUtils.deleteDirectory(new File(JMeterUtils.getJMeterHome(), " bin/ftp_test" ));
251+ FileUtils.deleteDirectory(new File(JMeterUtils.getJMeterHome(), " bin/temp/ ftp_test" ));
252252
253253FtpServer server = (FtpServer) props.get(" FTP_SERVER" );
254254try {
0 commit comments