jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1783947 - /jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestDNSCacheManager.java
Date Tue, 21 Feb 2017 21:38:18 GMT
Author: fschumacher
Date: Tue Feb 21 21:38:18 2017
New Revision: 1783947

URL: http://svn.apache.org/viewvc?rev=1783947&view=rev
Log:
use assertEquals to compare values instead of assertTrue with a boolean expression.

Modified:
    jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestDNSCacheManager.java

Modified: jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestDNSCacheManager.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestDNSCacheManager.java?rev=1783947&r1=1783946&r2=1783947&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestDNSCacheManager.java
(original)
+++ jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestDNSCacheManager.java
Tue Feb 21 21:38:18 2017
@@ -101,8 +101,8 @@ public class TestDNSCacheManager extends
         try {
             original.resolve("jmeter.apache.org");
             Assert.assertNotNull(original.resolver);
-            Assert.assertTrue(((ExtendedResolver)original.resolver).getResolvers().length==1);
-            Assert.assertTrue(original.cache.size()==1);
+            Assert.assertEquals(((ExtendedResolver)original.resolver).getResolvers().length,
1);
+            Assert.assertEquals(original.cache.size(), 1);
             // OK
         } catch (UnknownHostException e) {
             fail("Should have succeeded resolving jmeter.apache.org, error:"+e.getMessage());
@@ -143,7 +143,7 @@ public class TestDNSCacheManager extends
             // This will use Default System DNS resolver
             original.resolve("jmeter.apache.org");
             Assert.assertNotNull(original.resolver);
-            Assert.assertTrue(((ExtendedResolver)original.resolver).getResolvers().length==0);
+            Assert.assertEquals(((ExtendedResolver)original.resolver).getResolvers().length,
0);
         } catch (UnknownHostException e) {
             fail("Should have failed as no DNS server provided");
         }



Mime
View raw message