This is an automated email from the ASF dual-hosted git repository.
rzo1 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/storm.git
The following commit(s) were added to refs/heads/master by this push:
new d9dae3f64 Fix DeserializingConnectionCallbackTest negative-length
assertion (#9081)
d9dae3f64 is described below
commit d9dae3f6491725df5c393b97247a389d24cc35d0
Author: reiabreu <[email protected]>
AuthorDate: Thu Sep 10 01:33:50 2026 +0100
Fix DeserializingConnectionCallbackTest negative-length assertion (#9081)
---
.../apache/storm/messaging/DeserializingConnectionCallbackTest.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/storm-client/test/jvm/org/apache/storm/messaging/DeserializingConnectionCallbackTest.java
b/storm-client/test/jvm/org/apache/storm/messaging/DeserializingConnectionCallbackTest.java
index c62043679..2a982b3a3 100644
---
a/storm-client/test/jvm/org/apache/storm/messaging/DeserializingConnectionCallbackTest.java
+++
b/storm-client/test/jvm/org/apache/storm/messaging/DeserializingConnectionCallbackTest.java
@@ -164,14 +164,14 @@ public class DeserializingConnectionCallbackTest {
byte[] bytes = serializedTuple(conf, Collections.singletonList(new
JavaSerializedValue()));
// SerializableSerializer writes the java-serialization byte count
right before the stream header;
- // an all-bits-set count makes it allocate a negative-length array.
+ // an all-bits-set count reads back as a negative length, which the
serializer rejects before allocation.
int headerIdx = indexOf(bytes, JAVA_STREAM_HEADER, 0);
assertTrue(headerIdx >= 4, "java serialization header not found in
tuple payload");
for (int i = 1; i <= 4; i++) {
bytes[headerIdx - i] = (byte) 0xFF;
}
- assertThrows(NegativeArraySizeException.class, () -> new
KryoTupleDeserializer(conf, context).deserialize(bytes));
+ assertThrows(KryoException.class, () -> new
KryoTupleDeserializer(conf, context).deserialize(bytes));
assertBatchDeliversOnlyValidMessages(conf, bytes);
}