vlsi commented on PR #693: URL: https://github.com/apache/jmeter/pull/693#issuecomment-1301997901
Here's a problem: ```java @Test public void testDemoProblem() throws Exception { AbstractTestElement o1 = new ConstantTimer(); AbstractTestElement o2 = new ConstantTimer(); Set<Timer> timers = new HashSet<>(); timers.add(o1); timers.add(o2); Assert.assertEquals(2, timers.size(), "there should be 2 timers in the set"); } ``` Pretty much the same issue happens in `SearchByClass` which is used to search `ThreadGroup`, `ResultCollector`, etc elements. It is expected that `SearchByClass` would find **all** instances, however, if hash codes collide, then `SearchByClass` would produce fewer elements than present in the test plan. Pretty much the same happens if you load `.jmx` file. For instance, try doing the following: ```bash $ export _JAVA_OPTIONS="-XX:+UnlockExperimentalVMOptions -XX:hashCode=2" $ ./gradlew runGui ``` Then open `bin/testfiles/BUG_62847.jmx`, and save it as `bin/testfiles/BUG_62847_2.jmx` You'll see that JMeter discards two of three thread groups. In other words, I would expect that the file should be pretty much the same after re-save, however, the file is significantly different. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@jmeter.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org