jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1814105 - in /jmeter/trunk/test/src/org/apache: jmeter/ jmeter/control/ jmeter/extractor/ jmeter/gui/util/ jmeter/protocol/http/modifier/ jmeter/protocol/http/parser/ jmeter/protocol/http/proxy/ jmeter/protocol/http/sampler/ jmeter/visuali...
Date Thu, 02 Nov 2017 20:09:53 GMT
Author: pmouawad
Date: Thu Nov  2 20:09:52 2017
New Revision: 1814105

URL: http://svn.apache.org/viewvc?rev=1814105&view=rev
Log:
Removed commented out code (part 3)
Contributed by Graham Russell
This closes #319

Modified:
    jmeter/trunk/test/src/org/apache/jmeter/JMeterVersionTest.java
    jmeter/trunk/test/src/org/apache/jmeter/control/TestIfController.java
    jmeter/trunk/test/src/org/apache/jmeter/control/TestWhileController.java
    jmeter/trunk/test/src/org/apache/jmeter/extractor/TestRegexExtractor.java
    jmeter/trunk/test/src/org/apache/jmeter/gui/util/JSyntaxTextAreaTest.java
    jmeter/trunk/test/src/org/apache/jmeter/protocol/http/modifier/TestURLRewritingModifier.java
    jmeter/trunk/test/src/org/apache/jmeter/protocol/http/parser/TestBug60842HtmlParser.java
    jmeter/trunk/test/src/org/apache/jmeter/protocol/http/proxy/TestHttpRequestHdr.java
    jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/HTTPNullSampler.java
    jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java
    jmeter/trunk/test/src/org/apache/jmeter/visualizers/TestSamplingStatCalculator.java
    jmeter/trunk/test/src/org/apache/jorphan/collections/PackageTest.java
    jmeter/trunk/test/src/org/apache/jorphan/reflect/TestFunctor.java

Modified: jmeter/trunk/test/src/org/apache/jmeter/JMeterVersionTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/JMeterVersionTest.java?rev=1814105&r1=1814104&r2=1814105&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/JMeterVersionTest.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/JMeterVersionTest.java Thu Nov  2 20:09:52 2017
@@ -160,7 +160,6 @@ public class JMeterVersionTest extends J
             if (m.matches()) {
                 String jar = m.group(1);
                 String version = m.group(2);
-//                System.out.println(jar + " => " + version);
                 if (jar.endsWith("-jdk15on")) { // special handling
                     jar=jar.replace("-jdk15on","");
                 } else if (jar.equals("commons-jexl") && version.startsWith("2"))
{ // special handling

Modified: jmeter/trunk/test/src/org/apache/jmeter/control/TestIfController.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/control/TestIfController.java?rev=1814105&r1=1814104&r2=1814105&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/control/TestIfController.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/control/TestIfController.java Thu Nov  2 20:09:52
2017
@@ -156,41 +156,6 @@ public class TestIfController extends JM
 
         // TODO enable some proper tests!!
 
-        /*
-         * GenericController sub_1 = new GenericController();
-         * sub_1.addTestElement(new IfController("3==3"));
-         * controller.addTestElement(sub_1); controller.addTestElement(new
-         * IfController("false==true"));
-         */
-
-        /*
-         * GenericController controller = new GenericController();
-         * GenericController sub_1 = new GenericController();
-         * sub_1.addTestElement(new IfController("10<100"));
-         * sub_1.addTestElement(new IfController("true==false"));
-         * controller.addTestElement(sub_1); controller.addTestElement(new
-         * IfController("false==false"));
-         * 
-         * IfController sub_2 = new IfController(); sub_2.setCondition(
-         * "10<10000"); GenericController sub_3 = new GenericController();
-         * 
-         * sub_2.addTestElement(new IfController( " \"a\".equals(\"a\")" ) );
-         * sub_3.addTestElement(new IfController("2>100"));
-         * sub_3.addTestElement(new IfController("false==true"));
-         * sub_2.addTestElement(sub_3); sub_2.addTestElement(new
-         * IfController("2==3")); controller.addTestElement(sub_2);
-         */
-
-        /*
-         * IfController controller = new IfController("12==12");
-         * controller.initialize();
-         */
-        // TestElement sampler = null;
-        // while ((sampler = controller.next()) != null) {
-        // logger.debug(" ->>> Gonna assertTrue :" +
-        // sampler.getClass().getName() + " Property is ---->>>"
-        // + sampler.getName());
-        // }
     }
 
     @Test

Modified: jmeter/trunk/test/src/org/apache/jmeter/control/TestWhileController.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/control/TestWhileController.java?rev=1814105&r1=1814104&r2=1814105&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/control/TestWhileController.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/control/TestWhileController.java Thu Nov  2 20:09:52
2017
@@ -70,14 +70,12 @@ public class TestWhileController extends
         // While (blank), previous sample OK - should loop until false
         @Test
         public void testBlankPrevOK() throws Exception {
-//          log.info("testBlankPrevOK");
             runtestPrevOK("");
         }
 
         // While (LAST), previous sample OK - should loop until false
         @Test
         public void testLastPrevOK() throws Exception {
-//          log.info("testLASTPrevOK");
             runtestPrevOK("LAST");
         }
 
@@ -86,7 +84,6 @@ public class TestWhileController extends
         // While (LAST), previous sample OK - should loop until false
         @Test
         public void testOtherPrevOK() throws Exception {
-//          log.info("testOtherPrevOK");
             runtestPrevOK(OTHER);
         }
 
@@ -137,7 +134,6 @@ public class TestWhileController extends
         // While (blank), previous sample failed - should run once
         @Test
         public void testBlankPrevFailed() throws Exception {
-//          log.info("testBlankPrevFailed");
             GenericController controller = new GenericController();
             controller.setRunningVersion(true);
             WhileController while_cont = new WhileController();
@@ -275,14 +271,12 @@ public class TestWhileController extends
         // While LAST, previous sample failed - should not run
         @Test
         public void testLASTPrevFailed() throws Exception {
-//          log.info("testLastPrevFailed");
             runTestPrevFailed("LAST");
         }
 
         // While False, previous sample failed - should not run
         @Test
         public void testfalsePrevFailed() throws Exception {
-//          log.info("testFalsePrevFailed");
             runTestPrevFailed("False");
         }
 
@@ -368,7 +362,6 @@ public class TestWhileController extends
                     assertNull(nextName(controller));
                 }
             } catch (StackOverflowError e) {
-                // e.printStackTrace();
                 fail(e.toString());
             }
         }

Modified: jmeter/trunk/test/src/org/apache/jmeter/extractor/TestRegexExtractor.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/extractor/TestRegexExtractor.java?rev=1814105&r1=1814104&r2=1814105&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/extractor/TestRegexExtractor.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/extractor/TestRegexExtractor.java Thu Nov  2 20:09:52
2017
@@ -353,7 +353,6 @@ public class TestRegexExtractor {
             extractor.setRegex("<value field=\"(pinposition\\d+)\">(\\d+)</value>");
             extractor.setTemplate("$2$");
             extractor.setMatchNumber(4);
-            //extractor.setDefaultValue("default");
             vars.put("regVal", "initial");
             assertEquals("initial", vars.get("regVal"));
             extractor.process();

Modified: jmeter/trunk/test/src/org/apache/jmeter/gui/util/JSyntaxTextAreaTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/gui/util/JSyntaxTextAreaTest.java?rev=1814105&r1=1814104&r2=1814105&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/gui/util/JSyntaxTextAreaTest.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/gui/util/JSyntaxTextAreaTest.java Thu Nov  2 20:09:52
2017
@@ -65,17 +65,5 @@ public class JSyntaxTextAreaTest extends
                 fail("Invalid property value: " + s);
             }
         }
-        // Show unused entries
-//        for (Object s : languageProperties.values()) {
-//            values.remove(s);
-//        }
-//        if (values.size() > 0) {
-//            System.out.print("Unused JSyntaxAreaTypes:");
-//            for (String value : values) {
-//                System.out.print(" ");
-//                System.out.print(value);
-//            }
-//            System.out.println();
-//        }
     }
 }

Modified: jmeter/trunk/test/src/org/apache/jmeter/protocol/http/modifier/TestURLRewritingModifier.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/modifier/TestURLRewritingModifier.java?rev=1814105&r1=1814104&r2=1814105&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/protocol/http/modifier/TestURLRewritingModifier.java
(original)
+++ jmeter/trunk/test/src/org/apache/jmeter/protocol/http/modifier/TestURLRewritingModifier.java
Thu Nov  2 20:09:52 2017
@@ -142,8 +142,6 @@ public class TestURLRewritingModifier ex
             context.setPreviousResult(response);
             mod.process();
             Arguments args = sampler.getArguments();
-            // System.out.println(((Argument) args.getArguments().get(0).getObjectValue()).getValue());
-            // System.out.println(sampler.toString());
             assertEquals("bonjour+monsieur", ((Argument) args.getArguments().get(0).getObjectValue())
                     .getValue());
             assertEquals("http://server.com/index.html?" + "session_id=bonjour%2Bmonsieur",
sampler.toString());

Modified: jmeter/trunk/test/src/org/apache/jmeter/protocol/http/parser/TestBug60842HtmlParser.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/parser/TestBug60842HtmlParser.java?rev=1814105&r1=1814104&r2=1814105&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/protocol/http/parser/TestBug60842HtmlParser.java
(original)
+++ jmeter/trunk/test/src/org/apache/jmeter/protocol/http/parser/TestBug60842HtmlParser.java
Thu Nov  2 20:09:52 2017
@@ -101,11 +101,6 @@ public class TestBug60842HtmlParser {
                     new Object[] { parserToTest,
                             "<anytag style=\"foo: url('bar')'\"/>",
                             "http://example.org/bar" },
-                    // new Object[] {p,"<anytag style=\"foo: url(bar)'\"/>",
-                    // "http://example.org/bar"},
-                    // new Object[] {p,"<anytag style=\"foo: url(bar)'; other:
-                    // url(something);\"/>",
-                    // "http://example.org/bar,http://example.org/something"},
                     new Object[] { parserToTest,
                             "<link href='  abc\n.css  ' rel='stylesheet'/>",
                             "http://example.org/abc.css" },

Modified: jmeter/trunk/test/src/org/apache/jmeter/protocol/http/proxy/TestHttpRequestHdr.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/proxy/TestHttpRequestHdr.java?rev=1814105&r1=1814104&r2=1814105&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/protocol/http/proxy/TestHttpRequestHdr.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/protocol/http/proxy/TestHttpRequestHdr.java Thu
Nov  2 20:09:52 2017
@@ -649,8 +649,6 @@ public class TestHttpRequestHdr extends
             String contentEncoding,
             boolean expectedEncoded) throws IOException {
         assertEquals(expectedName, arg.getName());
-//        System.out.println("expect " + URLEncoder.encode(expectedValue, "UTF-8"));
-//        System.out.println("actual " + URLEncoder.encode(arg.getValue(), "UTF-8"));
         assertEquals(expectedValue, arg.getValue());
         if(contentEncoding != null && contentEncoding.length() > 0) {
             assertEquals(expectedEncodedValue, arg.getEncodedValue(contentEncoding));

Modified: jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/HTTPNullSampler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/HTTPNullSampler.java?rev=1814105&r1=1814104&r2=1814105&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/HTTPNullSampler.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/HTTPNullSampler.java Thu
Nov  2 20:09:52 2017
@@ -40,7 +40,6 @@ public final class HTTPNullSampler exten
         res.setURL(u);
         res.sampleEnd();
         return res;
-//        throw new UnsupportedOperationException("For test purposes only");
     }
 
 }

Modified: jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java?rev=1814105&r1=1814104&r2=1814105&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java
(original)
+++ jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java
Thu Nov  2 20:09:52 2017
@@ -1081,13 +1081,9 @@ public class TestHTTPSamplersAgainstHttp
     // TODO any point in checking the other headers?
     private void checkHeaderTypeLength(String requestHeaders, String contentType, int contentLen)
{
         boolean typeOK = isInRequestHeaders(requestHeaders, HTTPConstants.HEADER_CONTENT_TYPE,
contentType);
-//        boolean lengOK = isInRequestHeaders(requestHeaders, HTTPConstants.HEADER_CONTENT_LENGTH,
Integer.toString(contentLen));
         if (!typeOK){
             fail("Expected type:" + contentType + " in:\n"+ requestHeaders);
         }
-//        if (!lengOK){
-//            fail("Expected & length: " +contentLen + " in:\n"+requestHeaders);
-//        }
     }
    
     private String getSentRequestHeaderValue(String requestHeaders, String headerName) {
@@ -1144,7 +1140,6 @@ public class TestHTTPSamplersAgainstHttp
 
     private void setupUrl(HTTPSamplerBase sampler, String contentEncoding) {
         String protocol = "http";
-        // String domain = "localhost";
         String domain = "localhost";
         String path = "/test/somescript.jsp";
         sampler.setProtocol(protocol);

Modified: jmeter/trunk/test/src/org/apache/jmeter/visualizers/TestSamplingStatCalculator.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/visualizers/TestSamplingStatCalculator.java?rev=1814105&r1=1814104&r2=1814105&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/visualizers/TestSamplingStatCalculator.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/visualizers/TestSamplingStatCalculator.java Thu
Nov  2 20:09:52 2017
@@ -36,26 +36,6 @@ public class TestSamplingStatCalculator
         Assert.assertNotNull(ssc.getCurrentSample()); // probably needed to avoid NPEs with
GUIs
     }
 
-//    @Test
-//    public void testGetElapsed() {
-//        fail("Not yet implemented");
-//    }
-//
-//    @Test
-//    public void testGetRate() {
-//        fail("Not yet implemented");
-//    }
-//
-//    @Test
-//    public void testGetBytesPerSecond() {
-//        fail("Not yet implemented");
-//    }
-//
-//    @Test
-//    public void testGetKBPerSecond() {
-//        fail("Not yet implemented");
-//    }
-
     @Test
     public void testGetAvgPageBytes() {
         SampleResult res = new SampleResult();
@@ -68,85 +48,4 @@ public class TestSamplingStatCalculator
         ssc.addSample(res);
         Assert.assertEquals(5,ssc.getAvgPageBytes(),0);
     }
-
-//    @Test
-//    public void testGetLabel() {
-//        fail("Not yet implemented");
-//    }
-//
-//    @Test
-//    public void testAddSample() {
-//        fail("Not yet implemented");
-//    }
-//
-//    @Test
-//    public void testGetErrorPercentage() {
-//        fail("Not yet implemented");
-//    }
-//
-//    @Test
-//    public void testToString() {
-//        fail("Not yet implemented");
-//    }
-//
-//    @Test
-//    public void testGetErrorCount() {
-//        fail("Not yet implemented");
-//    }
-//
-//    @Test
-//    public void testGetMaxThroughput() {
-//        fail("Not yet implemented");
-//    }
-//
-//    @Test
-//    public void testGetDistribution() {
-//        fail("Not yet implemented");
-//    }
-//
-//    @Test
-//    public void testGetPercentPointDouble() {
-//        fail("Not yet implemented");
-//    }
-//
-//    @Test
-//    public void testGetCount() {
-//        fail("Not yet implemented");
-//    }
-//
-//    @Test
-//    public void testGetMax() {
-//        fail("Not yet implemented");
-//    }
-//
-//    @Test
-//    public void testGetMean() {
-//        fail("Not yet implemented");
-//    }
-//
-//    @Test
-//    public void testGetMeanAsNumber() {
-//        fail("Not yet implemented");
-//    }
-//
-//    @Test
-//    public void testGetMedian() {
-//        fail("Not yet implemented");
-//    }
-//
-//    @Test
-//    public void testGetMin() {
-//        fail("Not yet implemented");
-//    }
-//
-//    @Test
-//    public void testGetPercentPointFloat() {
-//        fail("Not yet implemented");
-//    }
-//
-//    @Test
-//    public void testGetStandardDeviation() {
-//        fail("Not yet implemented");
-//    }
-
 }

Modified: jmeter/trunk/test/src/org/apache/jorphan/collections/PackageTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jorphan/collections/PackageTest.java?rev=1814105&r1=1814104&r2=1814105&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jorphan/collections/PackageTest.java (original)
+++ jmeter/trunk/test/src/org/apache/jorphan/collections/PackageTest.java Thu Nov  2 20:09:52
2017
@@ -148,7 +148,6 @@ public class PackageTest {
 
             tree1.add("a1");
             tree1.add("a2");
-            // tree1.add("a3");
             tree2.add("a2");
             tree2.add("a1");
 

Modified: jmeter/trunk/test/src/org/apache/jorphan/reflect/TestFunctor.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jorphan/reflect/TestFunctor.java?rev=1814105&r1=1814104&r2=1814105&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jorphan/reflect/TestFunctor.java (original)
+++ jmeter/trunk/test/src/org/apache/jorphan/reflect/TestFunctor.java Thu Nov  2 20:09:52
2017
@@ -105,7 +105,6 @@ public class TestFunctor extends JMeterT
         Test2 t2 = new Test2("t2");
         Test1a t1a = new Test1a("aa");
         assertEquals("t1",f1.invoke(t1));
-        //assertEquals("t1",f1.invoke());
         try {
             f1.invoke(t2);
             fail("Should have generated error");
@@ -113,9 +112,7 @@ public class TestFunctor extends JMeterT
             
         }
         assertEquals("t2",f2.invoke(t2));
-        //assertEquals("t2",f2.invoke());
         assertEquals("1a:aa.",f1a.invoke(t1a));
-        //assertEquals("1a:aa.",f1a.invoke());
         try {
             f1a.invoke(t1);// can't call invoke using super class
             fail("Should have generated error");
@@ -124,7 +121,6 @@ public class TestFunctor extends JMeterT
         }
         // OK (currently) to invoke using sub-class 
         assertEquals("1a:aa.",f1.invoke(t1a));
-        //assertEquals("1a:aa.",f1.invoke());// N.B. returns different result from before
     }
     
     @Test



Mime
View raw message