Package org.apache.jorphan.util

Examples of org.apache.jorphan.util.JMeterStopThreadException


        try {
            myValue = FileUtils.readFileToString(new File(fileName), encoding);
        } catch (IOException e) {
            log.warn("Could not read file: "+fileName+" "+e.getMessage());
            throw new JMeterStopThreadException("End of sequence");
        }

        if (myName.length() > 0) {
            JMeterVariables vars = getVariables();
            if (vars != null) {// Can be null if called from Config item testEnded() method
View Full Code Here


                    } else {
                        line = ERR_IND;
                        if (myEnd != COUNT_UNUSED) {// Are we processing a file
                                                    // sequence?
                            log.info(tn + " Detected end of sequence.");
                            throw new JMeterStopThreadException("End of sequence");
                        }
                    }
                }
                myValue = line;
            } catch (IOException e) {
                String tn = Thread.currentThread().getName();
                log.error(tn + " error reading file " + e.toString());//$NON-NLS-1$
            }
        } else { // File was not opened successfully
            if (myEnd != COUNT_UNUSED) {// Are we processing a file sequence?
                String tn = Thread.currentThread().getName();
                log.info(tn + " Detected end of sequence.");
                throw new JMeterStopThreadException("End of sequence");
            }
        }

        if (myName.length() > 0) {
            JMeterVariables vars = getVariables();
View Full Code Here

            line = myBread.readLine();
                    } else {
                      line = ERR_IND;
                      if (myEnd != COUNT_UNUSED){// Are we processing a file sequence?
                        log.info(tn + " Detected end of sequence.");
                       throw new JMeterStopThreadException("End of sequence");
                      }
                    }
                }
                myValue = line;
            }
            catch (IOException e)
            {
        String tn = Thread.currentThread().getName();
                log.error(tn + " error reading file " + e.toString());//$NON-NLS-1$
            }
        } else { // File was not opened successfully
          if (myEnd != COUNT_UNUSED){// Are we processing a file sequence?
        String tn = Thread.currentThread().getName();
            log.info(tn + " Detected end of sequence.");
           throw new JMeterStopThreadException("End of sequence");
          }
        }

        if (myName.length() > 0){
      vars.put(myName, myValue);
View Full Code Here

        } catch (IOException e) { // treat the same as EOF
            log.error(e.toString());
        }
        if (lineValues.length == 0) {// i.e. EOF
            if (getStopThread()) {
                throw new JMeterStopThreadException("End of file detected");
            }
            for (String var :vars) {
                threadVars.put(var, EOFVALUE);
            }
        }
View Full Code Here

          } else {
            line = ERR_IND;
            if (myEnd != COUNT_UNUSED) {// Are we processing a file
                          // sequence?
              log.info(tn + " Detected end of sequence.");
              throw new JMeterStopThreadException("End of sequence");
            }
          }
        }
        myValue = line;
      } catch (IOException e) {
        String tn = Thread.currentThread().getName();
        log.error(tn + " error reading file " + e.toString());//$NON-NLS-1$
      }
    } else { // File was not opened successfully
      if (myEnd != COUNT_UNUSED) {// Are we processing a file sequence?
        String tn = Thread.currentThread().getName();
        log.info(tn + " Detected end of sequence.");
        throw new JMeterStopThreadException("End of sequence");
      }
    }

    if (myName.length() > 0) {
            JMeterVariables vars = getVariables();
View Full Code Here

          }
          // TODO - report unused columns?
          // TODO - provide option to set unused variables ?
            } else {
              if (getStopThread()) {
                throw new JMeterStopThreadException("End of file detected");
              }
                for (int a = 0; a < vars.length ; a++) {
                    threadVars.put(vars[a], EOFVALUE);
                }
            }
View Full Code Here

        try {
            myValue = FileUtils.readFileToString(new File(fileName), encoding);
        } catch (IOException e) {
            log.warn("Could not read file: "+fileName+" "+e.getMessage(), e);
            throw new JMeterStopThreadException("End of sequence", e);
        }

        if (myName.length() > 0) {
            JMeterVariables vars = getVariables();
            if (vars != null) {// Can be null if called from Config item testEnded() method
View Full Code Here

                    } else {
                        line = ERR_IND;
                        if (myEnd != COUNT_UNUSED) {// Are we processing a file
                                                    // sequence?
                            log.info(tn + " Detected end of sequence.");
                            throw new JMeterStopThreadException("End of sequence");
                        }
                    }
                }
                myValue = line;
            } catch (IOException e) {
                String tn = Thread.currentThread().getName();
                log.error(tn + " error reading file " + e.toString());//$NON-NLS-1$
            }
        } else { // File was not opened successfully
            if (myEnd != COUNT_UNUSED) {// Are we processing a file sequence?
                String tn = Thread.currentThread().getName();
                log.info(tn + " Detected end of sequence.");
                throw new JMeterStopThreadException("End of sequence");
            }
        }

        if (myName.length() > 0) {
            JMeterVariables vars = getVariables();
View Full Code Here

        } catch (IOException e) { // treat the same as EOF
            log.error(e.toString());
        }
        if (lineValues.length == 0) {// i.e. EOF
            if (getStopThread()) {
                throw new JMeterStopThreadException("End of file detected");
            }
            for (int a = 0; a < vars.length ; a++) {
                threadVars.put(vars[a], EOFVALUE);
            }
        }
View Full Code Here

                    } else {
                        line = ERR_IND;
                        if (myEnd != COUNT_UNUSED) {// Are we processing a file
                                                    // sequence?
                            log.info(tn + " Detected end of sequence.");
                            throw new JMeterStopThreadException("End of sequence");
                        }
                    }
                }
                myValue = line;
            } catch (IOException e) {
                String tn = Thread.currentThread().getName();
                log.error(tn + " error reading file " + e.toString());//$NON-NLS-1$
            }
        } else { // File was not opened successfully
            if (myEnd != COUNT_UNUSED) {// Are we processing a file sequence?
                String tn = Thread.currentThread().getName();
                log.info(tn + " Detected end of sequence.");
                throw new JMeterStopThreadException("End of sequence");
            }
        }

        if (myName.length() > 0) {
            JMeterVariables vars = getVariables();
View Full Code Here

TOP

Related Classes of org.apache.jorphan.util.JMeterStopThreadException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.