test: HandoverIT-POC - Renamed `TestClient` to `TestWriter` -- ALIGN
authorKai Moritz <kai@juplo.de>
Fri, 1 Mar 2024 12:48:57 +0000 (13:48 +0100)
committerKai Moritz <kai@juplo.de>
Fri, 1 Mar 2024 12:53:29 +0000 (13:53 +0100)
src/test/java/de/juplo/kafka/chat/backend/AbstractHandoverIT.java
src/test/java/de/juplo/kafka/chat/backend/TestWriter.java

index b67a2db..aaea973 100644 (file)
@@ -47,19 +47,19 @@ public abstract class AbstractHandoverIT
         .toStream()
         .toArray(size -> new ChatRoomInfoTo[size]);
 
-    TestClient[] testClients = Flux
+    TestWriter[] testWriters = Flux
         .fromStream(IntStream.range(0, NUM_CLIENTS).mapToObj(i -> "user-" + Integer.toString(i)))
-        .map(i -> new TestClient(
+        .map(i -> new TestWriter(
             containers.haproxy.getMappedPort(8400),
             chatRooms,
             i))
         .doOnNext(testClient -> executorService.execute(testClient))
         .toStream()
-        .toArray(size -> new TestClient[size]);
+        .toArray(size -> new TestWriter[size]);
 
     Thread.sleep(10000);
     Arrays
-        .stream(testClients)
+        .stream(testWriters)
         .forEach(testClient -> testClient.running = false);
 
     Flux
index 0d54600..076376e 100644 (file)
@@ -16,7 +16,7 @@ import java.util.concurrent.ThreadLocalRandom;
 
 
 @Slf4j
-public class TestClient implements Runnable
+public class TestWriter implements Runnable
 {
   @Override
   public void run()
@@ -86,7 +86,7 @@ public class TestClient implements Runnable
   volatile boolean running = true;
 
 
-  TestClient(Integer port, ChatRoomInfoTo[] chatRooms, String username)
+  TestWriter(Integer port, ChatRoomInfoTo[] chatRooms, String username)
   {
     webClient = WebClient.create("http://localhost:" + port);
     this.chatRooms = chatRooms;