martin-g commented on code in PR #2751:
URL: https://github.com/apache/avro/pull/2751#discussion_r1499229304
##########
lang/csharp/src/apache/test/AvroGen/AvroGenSchemaTests.cs:
##########
@@ -619,7 +619,10 @@ public void NotSupportedSchema(string schema, Type
expectedException)
string schemaFileName = Path.Combine(outputDir,
$"{uniqueId}.avsc");
System.IO.File.WriteAllText(schemaFileName, schema);
- Assert.That(AvroGenTool.GenSchema(schemaFileName, outputDir,
new Dictionary<string, string>(), false), Is.EqualTo(1));
+ // We now support unknown logical types
+ //Assert.That(AvroGenTool.GenSchema(schemaFileName, outputDir,
new Dictionary<string, string>(), false), Is.EqualTo(1));
Review Comment:
The commented out lines could be removed
##########
lang/csharp/src/apache/test/Schema/SchemaTests.cs:
##########
@@ -548,12 +549,79 @@ public void TestLogicalPrimitive(string s, string
baseType, string logicalType)
testToString(sc);
}
+ // Make sure unknown type is carried thru to LogicalTypeName
[TestCase("{\"type\": \"int\", \"logicalType\": \"unknown\"}",
"unknown")]
public void TestUnknownLogical(string s, string unknownType)
{
- var err = Assert.Throws<AvroTypeException>(() => Schema.Parse(s));
+ //var err = Assert.Throws<AvroTypeException>(() =>
Schema.Parse(s));
+ //Assert.AreEqual("Logical type '" + unknownType + "' is not
supported.", err.Message);
Review Comment:
Are these lines needed ?
--
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]