Github user ra0077 commented on the pull request: https://github.com/apache/jmeter/pull/162#issuecomment-196740926 I have swap it and remove formating to be easy to read it What I do is: check if the user have put a file name if not log it to allow easy debuging stop the test if yes no modification It allow to easy debug (a clear message in log) and avoid to have an exception to user The diff with the trunk: --- a/src/components/org/apache/jmeter/config/CSVDataSet.java +++ b/src/components/org/apache/jmeter/config/CSVDataSet.java @@ -146,6 +146,11 @@ public class CSVDataSet extends ConfigTestElement @Override public void iterationStart(LoopIterationEvent iterEvent) { + String _fileName = getFilename(); + if (_fileName.isEmpty()) { + log.error("No filename setup in CSV Data Set Config: "+this.getName()); + throw new JMeterStopThreadException("No filename setup in CSV Data Set Config: "+this.getName()); + } else { FileServer server = FileServer.getFileServer(); final JMeterContext context = getThreadContext(); String delim = getDelimiter(); @@ -156,7 +161,6 @@ public class CSVDataSet extends ConfigTestElement delim=","; } if (vars == null) { - String _fileName = getFilename(); String mode = getShareMode(); int modeInt = CSVDataSetBeanInfo.getShareModeAsInt(mode); switch(modeInt){ @@ -212,6 +216,7 @@ public class CSVDataSet extends ConfigTestElement threadVars.put(var, EOFVALUE); } } + } }
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---