chaokunyang commented on code in PR #2852:
URL: https://github.com/apache/fory/pull/2852#discussion_r2480637982
##########
java/fory-core/src/test/java/org/apache/fory/ThreadSafeForyTest.java:
##########
@@ -373,4 +373,40 @@ public void testSerializerRegister() {
return null;
});
}
+
+ @Test
+ public void testGetDepth() {
+ Fory fory = Fory.builder().requireClassRegistration(false).build();
+ Assert.assertEquals(fory.getDepth(), -1);
+ BeanA beanA = BeanA.createBeanA(2);
+ byte[] bytes = fory.serialize(beanA);
+ Assert.assertEquals(fory.getDepth(), -1);
+ fory.deserialize(bytes);
+ Assert.assertEquals(fory.getDepth(), -1);
+ }
+
+ @Test
+ public void testRegisterAfterSerializeThrowsException() {
Review Comment:
I don't see any code in this test `assertThrows` the exception has been
raised. Please update this test.
And please be consise, most of codes in this tests doesn't test the
unexpected register behaviour. Please remove such code, and concentrated on
unexpected register behaviour test only.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]