You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2017/01/29 21:57:34 UTC

svn commit: r1780861 - /jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestDNSCacheManager.java

Author: pmouawad
Date: Sun Jan 29 21:57:33 2017
New Revision: 1780861

URL: http://svn.apache.org/viewvc?rev=1780861&view=rev
Log:
Add test on cache

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=1780861&r1=1780860&r2=1780861&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 Sun Jan 29 21:57:33 2017
@@ -86,7 +86,15 @@ public class TestDNSCacheManager extends
             Assert.assertArrayEquals(expectedResult, actual);
             // OK
         } catch (UnknownHostException e) {
-            fail("System DNS server should have been used");
+            fail("Cache should have been used");
+        }
+        
+        try {
+            original.cache.put("jmeter.apache.org", null);
+            Assert.assertNull(original.resolve("jmeter.apache.org"));
+            // OK
+        } catch (UnknownHostException e) {
+            fail("Cache should have been used");
         }
     }