From 7c76ae9a272cf90796429cf0141ccea042c7f6ac Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Tue, 4 May 2021 16:32:37 -0400 Subject: [PATCH] Make sure to check not only the entire array but also how much was written --- .../com/velocitypowered/proxy/protocol/ProtocolUtilsTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/src/test/java/com/velocitypowered/proxy/protocol/ProtocolUtilsTest.java b/proxy/src/test/java/com/velocitypowered/proxy/protocol/ProtocolUtilsTest.java index 43b940806..57cd8f7da 100644 --- a/proxy/src/test/java/com/velocitypowered/proxy/protocol/ProtocolUtilsTest.java +++ b/proxy/src/test/java/com/velocitypowered/proxy/protocol/ProtocolUtilsTest.java @@ -83,7 +83,7 @@ public class ProtocolUtilsTest { writeVarIntOld(varintOld, i); ProtocolUtils.writeVarInt(varintNew, i); - assertArrayEquals(varintOld.array(), varintNew.array(), + assertArrayEquals(ByteBufUtil.getBytes(varintOld), ByteBufUtil.getBytes(varintNew), "Encoding of " + i + " was invalid"); assertEquals(i, oldReadVarIntSafely(varintNew));