View | Details | Raw Unified | Return to bug 57110
Collapse All | Expand All

(-)a/bin/jmeter (-2 / +2 lines)
Lines 27-33 Link Here
27
# Minimal version to run JMeter
27
# Minimal version to run JMeter
28
MINIMAL_VERSION=1.7.0
28
MINIMAL_VERSION=1.7.0
29
29
30
# Check if Java is present and the minimal version requierement
30
# Check if Java is present and the minimal version requirement
31
_java=`type java | awk '{ print $ NF }'`
31
_java=`type java | awk '{ print $ NF }'`
32
CURRENT_VERSION=`"$_java" -version 2>&1 | awk -F'"' '/version/ {print $2}'`
32
CURRENT_VERSION=`"$_java" -version 2>&1 | awk -F'"' '/version/ {print $2}'`
33
minimal_version=`echo $MINIMAL_VERSION | awk -F'.' '{ print $2 }'`
33
minimal_version=`echo $MINIMAL_VERSION | awk -F'.' '{ print $2 }'`
Lines 85-91 PRGDIR=`dirname "$PRG"` Link Here
85
#   Life length: for the life of the JVM.
85
#   Life length: for the life of the JVM.
86
86
87
# This is the base heap size -- you may increase or decrease it to fit your
87
# This is the base heap size -- you may increase or decrease it to fit your
88
# system's memory availablity:
88
# system's memory availability:
89
HEAP="-Xms512m -Xmx512m"
89
HEAP="-Xms512m -Xmx512m"
90
90
91
# There's an awful lot of per-sample objects allocated during test run, so we
91
# There's an awful lot of per-sample objects allocated during test run, so we
(-)a/bin/jmeter.sh (-1 / +1 lines)
Lines 30-36 Link Here
30
# Minimal version to run JMeter
30
# Minimal version to run JMeter
31
MINIMAL_VERSION=1.7.0
31
MINIMAL_VERSION=1.7.0
32
32
33
# Check if Java is present and the minimal version requierement
33
# Check if Java is present and the minimal version requirement
34
_java=`type java | awk '{ print $ NF }'`
34
_java=`type java | awk '{ print $ NF }'`
35
CURRENT_VERSION=`"$_java" -version 2>&1 | awk -F'"' '/version/ {print $2}'`
35
CURRENT_VERSION=`"$_java" -version 2>&1 | awk -F'"' '/version/ {print $2}'`
36
minimal_version=`echo $MINIMAL_VERSION | awk -F'.' '{ print $2 }'`
36
minimal_version=`echo $MINIMAL_VERSION | awk -F'.' '{ print $2 }'`
(-)a/src/components/org/apache/jmeter/assertions/DurationAssertion.java (-2 / +2 lines)
Lines 33-43 import org.apache.jmeter.util.JMeterUtils; Link Here
33
public class DurationAssertion extends AbstractScopedAssertion implements Serializable, Assertion {
33
public class DurationAssertion extends AbstractScopedAssertion implements Serializable, Assertion {
34
    private static final long serialVersionUID = 240L;
34
    private static final long serialVersionUID = 240L;
35
35
36
    /** Key for storing assertion-informations in the jmx-file. */
36
    /** Key for storing assertion-information in the jmx-file. */
37
    public static final String DURATION_KEY = "DurationAssertion.duration"; // $NON-NLS-1$
37
    public static final String DURATION_KEY = "DurationAssertion.duration"; // $NON-NLS-1$
38
38
39
    /**
39
    /**
40
     * Returns the result of the Assertion. Here it checks wether the Sample
40
     * Returns the result of the Assertion. Here it checks whether the Sample
41
     * took to long to be considered successful. If so an AssertionResult
41
     * took to long to be considered successful. If so an AssertionResult
42
     * containing a FailureMessage will be returned. Otherwise the returned
42
     * containing a FailureMessage will be returned. Otherwise the returned
43
     * AssertionResult will reflect the success of the Sample.
43
     * AssertionResult will reflect the success of the Sample.
(-)a/src/components/org/apache/jmeter/assertions/HTMLAssertion.java (-1 / +1 lines)
Lines 221-227 public class HTMLAssertion extends AbstractTestElement implements Serializable, Link Here
221
    /**
221
    /**
222
     * Gets the doctype
222
     * Gets the doctype
223
     * 
223
     * 
224
     * @return the documemt type
224
     * @return the document type
225
     */
225
     */
226
    public String getDoctype() {
226
    public String getDoctype() {
227
        return getPropertyAsString(DOCTYPE_KEY);
227
        return getPropertyAsString(DOCTYPE_KEY);
(-)a/src/components/org/apache/jmeter/assertions/MD5HexAssertion.java (-1 / +1 lines)
Lines 44-50 public class MD5HexAssertion extends AbstractTestElement implements Serializable Link Here
44
44
45
    private static final Logger log = LoggingManager.getLoggerForClass();
45
    private static final Logger log = LoggingManager.getLoggerForClass();
46
46
47
    /** Key for storing assertion-informations in the jmx-file. */
47
    /** Key for storing assertion-information in the jmx-file. */
48
    private static final String MD5HEX_KEY = "MD5HexAssertion.size";
48
    private static final String MD5HEX_KEY = "MD5HexAssertion.size";
49
49
50
    /*
50
    /*
(-)a/src/components/org/apache/jmeter/assertions/SMIMEAssertion.java (-2 / +2 lines)
Lines 188-195 class SMIMEAssertion { Link Here
188
188
189
                        String email = testElement.getSignerEmail();
189
                        String email = testElement.getSignerEmail();
190
                        if (!JOrphanUtils.isBlank(email)) {
190
                        if (!JOrphanUtils.isBlank(email)) {
191
                            List<String> emailfromCert = getEmailFromCert(cert);
191
                            List<String> emailFromCert = getEmailFromCert(cert);
192
                            if (!emailfromCert.contains(email)) {
192
                            if (!emailFromCert.contains(email)) {
193
                                res.setFailure(true);
193
                                res.setFailure(true);
194
                                failureMessage
194
                                failureMessage
195
                                        .append("Email address \"")
195
                                        .append("Email address \"")
(-)a/src/components/org/apache/jmeter/assertions/SMIMEAssertionTestElement.java (-2 / +2 lines)
Lines 72-79 public class SMIMEAssertionTestElement extends AbstractTestElement implements Link Here
72
        return getPropertyAsString(ISSUER_DN_KEY);
72
        return getPropertyAsString(ISSUER_DN_KEY);
73
    }
73
    }
74
74
75
    public void setIssuerDn(String issuertDn) {
75
    public void setIssuerDn(String issuerDn) {
76
        setProperty(ISSUER_DN_KEY, issuertDn);
76
        setProperty(ISSUER_DN_KEY, issuerDn);
77
    }
77
    }
78
78
79
    public boolean isSignerCheckByFile() {
79
    public boolean isSignerCheckByFile() {
(-)a/src/components/org/apache/jmeter/assertions/SizeAssertion.java (-2 / +2 lines)
Lines 36-42 public class SizeAssertion extends AbstractScopedAssertion implements Serializab Link Here
36
36
37
    private static final long serialVersionUID = 241L;
37
    private static final long serialVersionUID = 241L;
38
38
39
    // * Static int to signify the type of logical comparitor to assert
39
    // Static int to signify the type of logical comparator to assert
40
    public static final int EQUAL = 1;
40
    public static final int EQUAL = 1;
41
41
42
    public static final int NOTEQUAL = 2;
42
    public static final int NOTEQUAL = 2;
Lines 49-55 public class SizeAssertion extends AbstractScopedAssertion implements Serializab Link Here
49
49
50
    public static final int LESSTHANEQUAL = 6;
50
    public static final int LESSTHANEQUAL = 6;
51
51
52
    /** Key for storing assertion-informations in the jmx-file. */
52
    /** Key for storing assertion-information in the jmx-file. */
53
    private static final String SIZE_KEY = "SizeAssertion.size"; // $NON-NLS-1$
53
    private static final String SIZE_KEY = "SizeAssertion.size"; // $NON-NLS-1$
54
54
55
    private static final String OPERATOR_KEY = "SizeAssertion.operator"; // $NON-NLS-1$
55
    private static final String OPERATOR_KEY = "SizeAssertion.operator"; // $NON-NLS-1$
(-)a/src/components/org/apache/jmeter/assertions/XMLAssertion.java (-1 / +1 lines)
Lines 48-54 public class XMLAssertion extends AbstractTestElement implements Serializable, A Link Here
48
    };
48
    };
49
49
50
    /**
50
    /**
51
     * Returns the result of the Assertion. Here it checks wether the Sample
51
     * Returns the result of the Assertion. Here it checks whether the Sample
52
     * took to long to be considered successful. If so an AssertionResult
52
     * took to long to be considered successful. If so an AssertionResult
53
     * containing a FailureMessage will be returned. Otherwise the returned
53
     * containing a FailureMessage will be returned. Otherwise the returned
54
     * AssertionResult will reflect the success of the Sample.
54
     * AssertionResult will reflect the success of the Sample.
(-)a/src/components/org/apache/jmeter/assertions/XPathAssertion.java (-1 / +1 lines)
Lines 195-201 public class XPathAssertion extends AbstractScopedAssertion implements Serializa Link Here
195
    }
195
    }
196
196
197
    /**
197
    /**
198
     * Is this whitepsace ignored.
198
     * Is this whitespace ignored.
199
     *
199
     *
200
     * @return boolean
200
     * @return boolean
201
     */
201
     */
(-)a/src/components/org/apache/jmeter/assertions/gui/HTMLAssertionGui.java (-2 / +2 lines)
Lines 220-226 public class HTMLAssertionGui extends AbstractAssertionGui implements KeyListene Link Here
220
        docTypePanel.add(docTypeBox);
220
        docTypePanel.add(docTypeBox);
221
        assertionPanel.add(docTypePanel);
221
        assertionPanel.add(docTypePanel);
222
222
223
        // format (HMTL, XHTML, XML)
223
        // format (HTML, XHTML, XML)
224
        VerticalPanel formatPanel = new VerticalPanel();
224
        VerticalPanel formatPanel = new VerticalPanel();
225
        formatPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Format"));
225
        formatPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Format"));
226
        htmlRadioButton = new JRadioButton("HTML", true); //$NON-NLS-1$
226
        htmlRadioButton = new JRadioButton("HTML", true); //$NON-NLS-1$
Lines 318-324 public class HTMLAssertionGui extends AbstractAssertionGui implements KeyListene Link Here
318
    }
318
    }
319
319
320
    /**
320
    /**
321
     * This method is called from erros-only checkbox
321
     * This method is called from errors-only checkbox
322
     *
322
     *
323
     * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
323
     * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
324
     */
324
     */
(-)a/test/src/org/apache/commons/cli/avalon/ClutilTestCase.java (-2 / +2 lines)
Lines 37-43 public final class ClutilTestCase extends TestCase { Link Here
37
            "-Dstupid=idiot", "are", "--all", "--all", "here" };
37
            "-Dstupid=idiot", "are", "--all", "--all", "here" };
38
38
39
    private static final String[] ARGLIST4 = new String[] {
39
    private static final String[] ARGLIST4 = new String[] {
40
    // incompatable (blee/all)
40
    // incompatible (blee/all)
41
            "-Dstupid", "idiot", "are", "--all", "--blee", "here" };
41
            "-Dstupid", "idiot", "are", "--all", "--blee", "here" };
42
42
43
    private static final String[] ARGLIST5 = new String[] { "-f", "myfile.txt" };
43
    private static final String[] ARGLIST5 = new String[] { "-f", "myfile.txt" };
Lines 188-194 public final class ClutilTestCase extends TestCase { Link Here
188
    public void testOptionalArgLongEquals() {
188
    public void testOptionalArgLongEquals() {
189
        final CLOptionDescriptor[] options = new CLOptionDescriptor[] { ALL, TAINT };
189
        final CLOptionDescriptor[] options = new CLOptionDescriptor[] { ALL, TAINT };
190
190
191
        // Check that optional args work woth long options
191
        // Check that optional args work with long options
192
        final String[] args = new String[] { "--taint=param", "-a" };
192
        final String[] args = new String[] { "--taint=param", "-a" };
193
193
194
        final CLArgsParser parser = new CLArgsParser(args, options);
194
        final CLArgsParser parser = new CLArgsParser(args, options);
(-)a/test/src/org/apache/jmeter/assertions/SizeAssertionTest.java (-1 / +1 lines)
Lines 158-164 public class SizeAssertionTest extends JMeterTestCase{ Link Here
158
      }
158
      }
159
      
159
      
160
      private void assertFailed() throws Exception{
160
      private void assertFailed() throws Exception{
161
          assertNotNull("Failure nessage should not be null",result.getFailureMessage());
161
          assertNotNull("Failure message should not be null",result.getFailureMessage());
162
          //System.out.println(result.getFailureMessage());
162
          //System.out.println(result.getFailureMessage());
163
          assertFalse("Should not be: Response was null","Response was null".equals(result.getFailureMessage()));
163
          assertFalse("Should not be: Response was null","Response was null".equals(result.getFailureMessage()));
164
          assertFalse(result.isError());
164
          assertFalse(result.isError());
(-)a/test/src/org/apache/jmeter/assertions/XMLSchemaAssertionTest.java (-3 / +2 lines)
Lines 148-154 public class XMLSchemaAssertionTest extends JMeterTestCase { Link Here
148
        assertFalse(res.isFailure());
148
        assertFalse(res.isFailure());
149
    }
149
    }
150
150
151
    public void testXMLTrailingcontent() throws Exception {
151
    public void testXMLTrailingContent() throws Exception {
152
        ByteArrayOutputStream baos = readBA("testfiles/XMLSchematest.xml");
152
        ByteArrayOutputStream baos = readBA("testfiles/XMLSchematest.xml");
153
        baos.write("extra".getBytes()); // TODO - charset?
153
        baos.write("extra".getBytes()); // TODO - charset?
154
        result.setResponseData(baos.toByteArray());
154
        result.setResponseData(baos.toByteArray());
Lines 161-167 public class XMLSchemaAssertionTest extends JMeterTestCase { Link Here
161
        assertFalse(res.isFailure());
161
        assertFalse(res.isFailure());
162
    }
162
    }
163
163
164
    public void testXMLTrailingwhitespace() throws Exception {
164
    public void testXMLTrailingWhitespace() throws Exception {
165
        ByteArrayOutputStream baos = readBA("testfiles/XMLSchematest.xml");
165
        ByteArrayOutputStream baos = readBA("testfiles/XMLSchematest.xml");
166
        baos.write(" \t\n".getBytes()); // TODO - charset?
166
        baos.write(" \t\n".getBytes()); // TODO - charset?
167
        result.setResponseData(baos.toByteArray());
167
        result.setResponseData(baos.toByteArray());
168
- 

Return to bug 57110