From 4b735c571d0e1be60e954a7b89d4bb2740ca106c Mon Sep 17 00:00:00 2001 From: Wang Date: Mon, 30 Nov 2020 23:43:55 -0600 Subject: [PATCH] to LinkedHashMap --- .../logger/sender/TestSenderFluentdDownOperation.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/test/java/org/fluentd/logger/sender/TestSenderFluentdDownOperation.java b/src/test/java/org/fluentd/logger/sender/TestSenderFluentdDownOperation.java index c634016..36b3a6c 100644 --- a/src/test/java/org/fluentd/logger/sender/TestSenderFluentdDownOperation.java +++ b/src/test/java/org/fluentd/logger/sender/TestSenderFluentdDownOperation.java @@ -5,6 +5,7 @@ import java.io.IOException; import java.net.Socket; import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Map; import org.fluentd.logger.sender.RawSocketSender; @@ -31,7 +32,7 @@ public void testFluentdDownOperation01() throws Exception { // start senders RawSocketSender sender = new RawSocketSender("localhost", port); - Map data = new HashMap(); + Map data = new LinkedHashMap(); data.put("t1k1", "t1v1"); data.put("t1k2", "t1v2"); sender.emit("tag.label1", timestamp, data); @@ -40,7 +41,7 @@ public void testFluentdDownOperation01() throws Exception { byte[] bytes1 = packer.toByteArray(); assertArrayEquals(bytes1, sender.getBuffer()); - Map data2 = new HashMap(); + Map data2 = new LinkedHashMap(); data2.put("t2k1", "t2v1"); data2.put("t2k2", "t2v2"); sender.emit("tag.label2", timestamp, data2); @@ -83,7 +84,7 @@ public void process(MessagePack msgpack, Socket socket) throws IOException { // sleep a little bit Thread.sleep(1000); - Map data = new HashMap(); + Map data = new LinkedHashMap(); data.put("t1k1", "t1v1"); data.put("t1k2", "t1v2"); for (int i = 0; i < 3; ++i) { @@ -95,7 +96,7 @@ public void process(MessagePack msgpack, Socket socket) throws IOException { byte[] bytes1 = packer.toByteArray(); assertArrayEquals(bytes1, sender.getBuffer()); - Map data2 = new HashMap(); + Map data2 = new LinkedHashMap(); data2.put("t2k1", "t2v1"); data2.put("t2k2", "t2v2"); sender.emit("tag.label2", data2);