Package org.apache.jorphan.util

Examples of org.apache.jorphan.util.JMeterStopThreadException


        } 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


            }
            // 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

                }
                // 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

                line = connection.lpop(redisKey);               
            } else {
                line = connection.srandmember(redisKey);
            }
            if(line == null) { // i.e. no more data (nil)
                throw new JMeterStopThreadException("End of redis data detected, thread will exit");
            }
            final String names = variableNames;
            if (vars == null) {
                vars = JOrphanUtils.split(names, ","); // $NON-NLS-1$
            }
View Full Code Here

            threadVars.put(vars[a], lineValues[a]);
          }
          // 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

          } 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

        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) {
      vars.put(myName, myValue);
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.