Skip to content

Commit a885844

Browse files
committed
Add comment on test
1 parent 89940fc commit a885844

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

java-client/src/test/java/co/elastic/clients/elasticsearch/model/SerializationTest.java

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@
4141

4242
public class SerializationTest extends ModelTestCase {
4343

44+
/**
45+
* Loads all {@code _DESERIALIER} fields. Since the actual deserializers are lazily constructed at runtime
46+
* the first time a deserializer is used, we load them all to make sure they can be created and initialized
47+
* successfully.
48+
*/
4449
@Test
4550
public void loadAllDeserializers() throws Exception {
4651

@@ -67,20 +72,6 @@ public void loadAllDeserializers() throws Exception {
6772
// Check that all classes that have a _DESERIALIZER field also have the annotation
6873
ClassInfoList withDeserializer = scan.getAllClasses().filter((c) -> c.hasDeclaredField("_DESERIALIZER"));
6974
assertFalse(withDeserializer.isEmpty(), "No classes with a _DESERIALIZER field");
70-
71-
// Disabled for now, empty response classes still need a deserializer object
72-
// e.g. ExistsIndexTemplateResponse, PingResponse, ExistsResponse, ExistsAliasResponse
73-
//
74-
// Set<String> annotationNames = withAnnotation.stream().map(c -> c.getName()).collect(Collectors.toSet());
75-
// Set<String> withFieldNames = withDeserializer.stream().map(c -> c.getName()).collect(Collectors.toSet());
76-
//
77-
// withFieldNames.removeAll(annotationNames);
78-
//
79-
// assertFalse(
80-
// withFieldNames.size() + " classes with the field but not the annotation: " + withFieldNames,
81-
// !withFieldNames.isEmpty()
82-
// );
83-
8475
}
8576

8677
@Test

0 commit comments

Comments
 (0)