jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1728468 - in /jmeter/trunk/test/src/org/apache/jmeter: junit/ protocol/http/proxy/ protocol/http/util/accesslog/ samplers/
Date Thu, 04 Feb 2016 13:18:17 GMT
Author: sebb
Date: Thu Feb  4 13:18:17 2016
New Revision: 1728468

URL: http://svn.apache.org/viewvc?rev=1728468&view=rev
Log:
Fix autoboxing complaints

Modified:
    jmeter/trunk/test/src/org/apache/jmeter/junit/JMeterTestCase.java
    jmeter/trunk/test/src/org/apache/jmeter/protocol/http/proxy/TestHttpRequestHdr.java
    jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/accesslog/TestLogFilter.java
    jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleResult.java
    jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleSaveConfiguration.java

Modified: jmeter/trunk/test/src/org/apache/jmeter/junit/JMeterTestCase.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/junit/JMeterTestCase.java?rev=1728468&r1=1728467&r2=1728468&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/junit/JMeterTestCase.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/junit/JMeterTestCase.java Thu Feb  4 13:18:17
2016
@@ -160,4 +160,8 @@ public abstract class JMeterTestCase {
         } catch (InvalidVariableException ignored) {
         }
     }
+
+    public static void assertPrimitiveEquals(boolean expected, boolean actual) {
+        org.junit.Assert.assertEquals(Boolean.valueOf(expected), Boolean.valueOf(actual));
+    }
 }

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=1728468&r1=1728467&r2=1728468&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
Feb  4 13:18:17 2016
@@ -659,7 +659,7 @@ public class TestHttpRequestHdr extends
             // Most browsers use ISO-8859-1 as default encoding, even if spec says UTF-8
             assertEquals(expectedEncodedValue, arg.getEncodedValue("ISO-8859-1"));
         }
-        assertEquals(expectedEncoded, arg.isAlwaysEncoded());
+        assertPrimitiveEquals(expectedEncoded, arg.isAlwaysEncoded());
     }
     
     private int getBodyLength(String postBody, String contentEncoding) throws IOException
{

Modified: jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/accesslog/TestLogFilter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/accesslog/TestLogFilter.java?rev=1728468&r1=1728467&r2=1728468&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/accesslog/TestLogFilter.java
(original)
+++ jmeter/trunk/test/src/org/apache/jmeter/protocol/http/util/accesslog/TestLogFilter.java
Thu Feb  4 13:18:17 2016
@@ -137,7 +137,7 @@ public class TestLogFilter extends JMete
                 String theFile = td.file;
                 boolean expect = td.exclpatt;
 
-                assertEquals(!expect, testf.isFiltered(theFile, null));
+                assertPrimitiveEquals(!expect, testf.isFiltered(theFile, null));
                 String line = testf.filter(theFile);
                 if (line != null) {
                     assertTrue("Expect to accept " + theFile, expect);
@@ -154,7 +154,7 @@ public class TestLogFilter extends JMete
                 String theFile = td.file;
                 boolean expect = td.inclpatt;
 
-                assertEquals(!expect, testf.isFiltered(theFile, null));
+                assertPrimitiveEquals(!expect, testf.isFiltered(theFile, null));
                 String line = testf.filter(theFile);
                 if (line != null) {
                     assertTrue("Expect to accept " + theFile, expect);

Modified: jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleResult.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleResult.java?rev=1728468&r1=1728467&r2=1728468&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleResult.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleResult.java Thu Feb  4 13:18:17
2016
@@ -25,6 +25,8 @@ import static org.junit.Assert.assertTru
 import static org.junit.Assert.fail;
 
 import java.io.StringWriter;
+
+import org.apache.jmeter.junit.JMeterTestCase;
 import org.apache.jmeter.util.Calculator;
 import org.apache.log.LogTarget;
 import org.apache.log.format.Formatter;
@@ -208,7 +210,7 @@ public class TestSampleResult {
             // Sample that will get two sub results, simulates a web page load 
             SampleResult parent = new SampleResult(nanoTime, nanoThreadSleep);          
 
 
-            assertEquals(nanoTime, parent.useNanoTime);
+            JMeterTestCase.assertPrimitiveEquals(nanoTime, parent.useNanoTime);
             assertEquals(nanoThreadSleep, parent.nanoThreadSleep);
 
             long beginTest = parent.currentTimeInMillis();

Modified: jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleSaveConfiguration.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleSaveConfiguration.java?rev=1728468&r1=1728467&r2=1728468&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleSaveConfiguration.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/samplers/TestSampleSaveConfiguration.java Thu
Feb  4 13:18:17 2016
@@ -87,10 +87,10 @@ public class TestSampleSaveConfiguration
         assertTrue(a.equals(b));
         assertTrue(b.equals(a));
         assertEquals(a.hashCode(), b.hashCode());
-        assertEquals(a.saveUrl(), b.saveUrl());
-        assertEquals(a.saveAssertions(), b.saveAssertions());
+        assertPrimitiveEquals(a.saveUrl(), b.saveUrl());
+        assertPrimitiveEquals(a.saveAssertions(), b.saveAssertions());
         assertEquals(a.getDelimiter(), b.getDelimiter());
-        assertEquals(a.saveDataType(), b.saveDataType());
+        assertPrimitiveEquals(a.saveDataType(), b.saveDataType());
         
         a.setAssertions(false);
         // a and b should not be equal



Mime
View raw message