You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by GitBox <gi...@apache.org> on 2023/01/10 04:13:26 UTC

[GitHub] [avro] Jinzhengxu commented on a diff in pull request #2015: AVRO-3690: [lang/java/avro] Fix flaky test ‘testMultipleFieldAliases’

Jinzhengxu commented on code in PR #2015:
URL: https://github.com/apache/avro/pull/2015#discussion_r1065317940


##########
lang/java/avro/src/test/java/org/apache/avro/reflect/TestReflect.java:
##########
@@ -1274,12 +1274,14 @@ public void namespaceDefinitionOnFieldAliasMustThrowException() {
 
   @Test
   public void testMultipleFieldAliases() {
-
-    Schema expectedSchema = SchemaBuilder.record(ClassWithMultipleAliasesOnField.class.getSimpleName())
-        .namespace("org.apache.avro.reflect.TestReflect").fields().name("primitiveField").aliases("alias1", "alias2")
-        .type(Schema.create(org.apache.avro.Schema.Type.INT)).noDefault().endRecord();
-
-    check(ClassWithMultipleAliasesOnField.class, expectedSchema.toString());
+    Field field = new Field("primitiveField", Schema.create(Schema.Type.INT));
+    field.addAlias("alias1");
+    field.addAlias("alias2");
+    Schema avroMultiMeta = Schema.createRecord("ClassWithAliasOnField", null, "org.apache.avro.reflect.TestReflect",

Review Comment:
   Thank you for correcting me.



-- 
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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org