You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by to...@apache.org on 2014/12/10 16:28:15 UTC
svn commit: r1644454 -
/avro/trunk/lang/csharp/src/apache/test/CodGen/CodeGenTest.cs
Author: tomwhite
Date: Wed Dec 10 15:28:14 2014
New Revision: 1644454
URL: http://svn.apache.org/r1644454
Log:
AVRO-1602. Remove Dapper-style RPC trace facility (for CSharp).
Modified:
avro/trunk/lang/csharp/src/apache/test/CodGen/CodeGenTest.cs
Modified: avro/trunk/lang/csharp/src/apache/test/CodGen/CodeGenTest.cs
URL: http://svn.apache.org/viewvc/avro/trunk/lang/csharp/src/apache/test/CodGen/CodeGenTest.cs?rev=1644454&r1=1644453&r2=1644454&view=diff
==============================================================================
--- avro/trunk/lang/csharp/src/apache/test/CodGen/CodeGenTest.cs (original)
+++ avro/trunk/lang/csharp/src/apache/test/CodGen/CodeGenTest.cs Wed Dec 10 15:28:14 2014
@@ -99,38 +99,6 @@ namespace Avro.Test
}
- [Test]
- public void CanCodeGenTraceProtocol()
- {
- var traceProtocol =
- System.IO.File.ReadAllText("../../../../../share/schemas/org/apache/avro/ipc/trace/avroTrace.avpr");
- Protocol protocol = Protocol.Parse(traceProtocol);
- var compilerResults = GenerateProtocol(protocol);
-
- // instantiate object
- List<string> types = GetTypeFullNames(compilerResults.CompiledAssembly.GetTypes());
- Assert.AreEqual(6, types.Count);
- Assert.IsTrue(types.Contains("org.apache.avro.ipc.trace.ID"), "Should have contained ID type");
- Assert.IsTrue(types.Contains("org.apache.avro.ipc.trace.Span"), "Should have contained Span type");
- Assert.IsTrue(types.Contains("org.apache.avro.ipc.trace.SpanEvent"), "Should have contained SpanEvent type");
- Assert.IsTrue(types.Contains("org.apache.avro.ipc.trace.TimestampedEvent"),
- "Should have contained TimestampedEvent type");
- Assert.IsTrue(types.Contains("org.apache.avro.ipc.trace.AvroTrace"), "Should have contained SpanEvent type");
- Assert.IsTrue(types.Contains("org.apache.avro.ipc.trace.AvroTraceCallback"),
- "Should have contained TimestampedEvent type");
- }
-
- private static List<string> GetTypeFullNames(Type[] types)
- {
- var typeFullNames = new List<string>();
- foreach (var type in types)
- {
- typeFullNames.Add(type.FullName);
- }
- return typeFullNames;
- }
-
-
private static CompilerResults GenerateSchema(Schema schema)
{
var codegen = new CodeGen();
@@ -138,13 +106,6 @@ namespace Avro.Test
return GenerateAssembly(codegen);
}
- private static CompilerResults GenerateProtocol(Protocol protocol)
- {
- var codegen = new CodeGen();
- codegen.AddProtocol(protocol);
- return GenerateAssembly(codegen);
- }
-
private static CompilerResults GenerateAssembly(CodeGen schema)
{
var compileUnit = schema.GenerateCode();