jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vladimirsitni...@apache.org
Subject [jmeter] 01/02: Remove hashcode inequality tests because hashcodes might collide by accident
Date Thu, 26 Sep 2019 21:21:02 GMT
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git

commit 52b3d51c90f819ae773256ce8ef41413e0ceefe5
Author: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
AuthorDate: Fri Sep 27 00:20:32 2019 +0300

    Remove hashcode inequality tests because hashcodes might collide by accident
    
    https://jqno.nl/equalsverifier/ should be used to verify equals vs hashCode consistency
---
 .../apache/jmeter/gui/action/template/TestTemplateManager.java    | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/src/components/src/test/java/org/apache/jmeter/gui/action/template/TestTemplateManager.java
b/src/components/src/test/java/org/apache/jmeter/gui/action/template/TestTemplateManager.java
index 68ff67e..10edf0e 100644
--- a/src/components/src/test/java/org/apache/jmeter/gui/action/template/TestTemplateManager.java
+++ b/src/components/src/test/java/org/apache/jmeter/gui/action/template/TestTemplateManager.java
@@ -114,13 +114,6 @@ public class TestTemplateManager extends JMeterTestCase {
         assertNotEquals(testTemplate2, testTemplate3);
         assertNotEquals(testTemplate3, testTemplate1);
         assertNotEquals(testTemplate3, testTemplate2);
-
-        assertNotEquals(testTemplate1.hashCode(), testTemplate2.hashCode());
-        assertNotEquals(testTemplate1.hashCode(), testTemplate3.hashCode());
-        assertNotEquals(testTemplate2.hashCode(), testTemplate1.hashCode());
-        assertNotEquals(testTemplate2.hashCode(), testTemplate3.hashCode());
-        assertNotEquals(testTemplate3.hashCode(), testTemplate1.hashCode());
-        assertNotEquals(testTemplate3.hashCode(), testTemplate2.hashCode());
     }
 
     @Test
@@ -136,6 +129,5 @@ public class TestTemplateManager extends JMeterTestCase {
         Template template2 = readTemplateFromFile().get("testTemplateWithParameters");
         template2.setParameters(Collections.singletonMap("key", "value"));
         assertNotEquals(template1, template2);
-        assertNotEquals(template1.hashCode(), template2.hashCode());
     }
 }


Mime
View raw message