You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by fs...@apache.org on 2022/04/18 20:04:07 UTC

[jmeter] branch master updated: Code clean-up mainly to trigger CI

This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new ce94f0db8a Code clean-up mainly to trigger CI
ce94f0db8a is described below

commit ce94f0db8ab17e27dec2ec5474dbb1c1c940b8a8
Author: Felix Schumacher <fe...@internetallee.de>
AuthorDate: Mon Apr 18 22:03:32 2022 +0200

    Code clean-up mainly to trigger CI
    
    Junit5 method conversion and a few minor nags from IDE.
---
 .../test/java/org/apache/jmeter/threads/TestJMeterThread.java  | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/core/src/test/java/org/apache/jmeter/threads/TestJMeterThread.java b/src/core/src/test/java/org/apache/jmeter/threads/TestJMeterThread.java
index 7ad315d949..a114203099 100644
--- a/src/core/src/test/java/org/apache/jmeter/threads/TestJMeterThread.java
+++ b/src/core/src/test/java/org/apache/jmeter/threads/TestJMeterThread.java
@@ -17,9 +17,6 @@
 
 package org.apache.jmeter.threads;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
 import java.time.Instant;
 
 import org.apache.jmeter.control.LoopController;
@@ -65,7 +62,7 @@ class TestJMeterThread {
             if (!super.equals(obj)) {
                 return false;
             }
-            if (getClass() != obj.getClass()) {
+            if (!getClass().equals(obj.getClass())) {
                 return false;
             }
             DummySampler other = (DummySampler) obj;
@@ -75,6 +72,7 @@ class TestJMeterThread {
     }
 
     private static class DummyTimer extends AbstractTestElement implements Timer {
+        private static final long serialVersionUID = 5641410390783919241L;
         private long delay;
 
         void setDelay(long delay) {
@@ -160,11 +158,11 @@ class TestJMeterThread {
         jMeterThread.run();
         long duration = Instant.now().toEpochMilli() - startTime.toEpochMilli();
 
-        assertFalse("Sampler should not be called", dummySampler.isCalled());
+        Assertions.assertFalse(dummySampler.isCalled(), "Sampler should not be called");
 
         // the duration of this test plan should currently be around zero seconds,
         // but it is allowed to take up to maxDuration amount of time
-        assertTrue("Test plan should not run for longer than duration", duration <= maxDuration);
+        Assertions.assertTrue(duration <= maxDuration, "Test plan should not run for longer than duration");
     }
 
     private LoopController createLoopController() {