rpuch commented on a change in pull request #567:
URL: https://github.com/apache/ignite-3/pull/567#discussion_r788693737
##########
File path:
modules/network/src/test/java/org/apache/ignite/internal/network/serialization/marshal/DefaultUserObjectMarshallerWithArbitraryObjectsTest.java
##########
@@ -478,6 +491,112 @@ void
unmarshalsDifferentButEqualObjectsToDifferentObjects() throws Exception {
assertThat(unmarshalled.get(0),
not(sameInstance(unmarshalled.get(1))));
}
+ public static void main(String[] args) throws Exception {
+ new
DefaultUserObjectMarshallerWithArbitraryObjectsTest().generateTestData();
+ }
+
+ private void generateTestData() throws Exception {
+ MarshalledObject marshalled = marshaller.marshal(testProxyInstance());
+
+ List<ClassDescriptor> remoteDescriptors = marshalled.usedDescriptors()
+ .stream()
+ .filter(descriptor -> descriptor.descriptorId() >= 1000)
+ .sorted(comparing(ClassDescriptor::descriptorId))
+ .collect(toList());
+ try (
+ OutputStream fos =
Files.newOutputStream(Paths.get("modules/network/src/test/resources/marshalled-proxy-classes.bin"));
Review comment:
What's the problem with storing *tiny* binaries in git?
The idea of this test was to make sure that the name of the real generated
proxy implementation class is not serialized, so I marshalled it in one JVM
instance and then unmarshal it in another JVM instance. To keep this behavior,
we would have to marshal in a JVM that is different from the one which runs
tests. It seems a bit of an overkill to write such a test if we can generate
the binary data once and then just read it from a file on the FS.
--
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]