Giter Club home page Giter Club logo

apache-avro-core's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

apache-avro-core's Issues

6 unit tests fail on mac/linux

Before we can have a nuget release we need to port to .net standard (pull request here).

After that pull request, the library should be as before from a source perspective just targeting .net standard 2.0. However, it will have 6 unit test failures on linux/mac (including the 3 failures on Windows). This issue is reported to track and fix those. The log from dotnet test is below ...

Thanks
Sid

Build started, please wait...
Build started, please wait...
Build completed.

Test run for /Volumes/Data/projects/personal/github/Apache-Avro-Core/Avro/bin/Debug/netcoreapp2.0/Avro.dll(.NETCoreApp,Version=v2.0)
Microsoft (R) Test Execution Command Line Tool Version 15.5.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...

Build completed.

Test run for /Volumes/Data/projects/personal/github/Apache-Avro-Core/Avro.UnitTest/bin/Debug/netcoreapp2.0/Avro.UnitTest.dll(.NETCoreApp,Version=v2.0)
Microsoft (R) Test Execution Command Line Tool Version 15.5.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
NUnit Adapter 3.9.0.0: Test execution started
Running all tests in /Volumes/Data/projects/personal/github/Apache-Avro-Core/Avro.UnitTest/bin/Debug/netcoreapp2.0/Avro.UnitTest.dll
NUnit3TestExecutor converted 388 of 388 NUnit test cases
Failed   TestAliases("{\"type\":\"record\",\"name\":\"LongList\", \"namespace\":\"com\", \"aliases\":[\"c\",\"foo.y\"],\r\n                   \"fields\":\r\n                    [{\"name\":\"f1\",\"type\":\"long\", \"extraprop\":\"important\", \"id\":\"1029\", \"aliases\":[\"a\",\"b\",\"c\"] },\r\n                     {\"name\":\"f2\",\"type\": \"int\"}]}",True)
Error Message:
   Expected: False
  But was:  True

Stack Trace:
   at Avro.Test.AliasTest.TestAliases(String s, Boolean valid) in /Volumes/Data/projects/personal/github/Apache-Avro-Core/Avro.UnitTest/Schema/AliasTest.cs:line 79

Standard Output Messages:
 Unexpected character encountered while parsing value: i. Path 'fields[0].extraprop', line 1, position 130.

Failed   TestAliases("{\"type\":\"record\",\"name\":\"LongList\", \"aliases\":[\"Alias1\"], \"customprop\":\"123456\",\r\n                   \"fields\":[{\"name\":\"f1\",\"type\":\"long\", \"order\":\"ascending\", \"fprop\":\"faaa\" },\r\n                    {\"name\":\"f2\",\"type\": \"int\"}]}",True)
Error Message:
   Expected: False
  But was:  True

Stack Trace:
   at Avro.Test.AliasTest.TestAliases(String s, Boolean valid) in /Volumes/Data/projects/personal/github/Apache-Avro-Core/Avro.UnitTest/Schema/AliasTest.cs:line 79

Standard Output Messages:
 Error parsing boolean value. Path 'fields[0].fprop', line 1, position 103.

Failed   CanonicalTest
Error Message:
 System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.
  ----> System.IO.DirectoryNotFoundException : Could not find a part of the path '/Volumes/Data/projects/personal/github/share/test/data/schema-tests.txt'.
Stack Trace:
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at NUnit.Framework.TestCaseSourceAttribute.GetTestCaseSource(IMethodInfo method)
   at NUnit.Framework.TestCaseSourceAttribute.GetTestCasesFor(IMethodInfo method)
--DirectoryNotFoundException
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
   at System.IO.StreamReader..ctor(String path)
   at System.IO.File.OpenText(String path)
   at Avro.Test.SchemaNormalizationTests.ProvideCanonicalTestCases() in /Volumes/Data/projects/personal/github/Apache-Avro-Core/Avro.UnitTest/Schema/SchemaNormalizationTests.cs:line 62
Failed   FingerprintTest
Error Message:
 System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.
  ----> System.IO.DirectoryNotFoundException : Could not find a part of the path '/Volumes/Data/projects/personal/github/share/test/data/schema-tests.txt'.
Stack Trace:
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at NUnit.Framework.TestCaseSourceAttribute.GetTestCaseSource(IMethodInfo method)
   at NUnit.Framework.TestCaseSourceAttribute.GetTestCasesFor(IMethodInfo method)
--DirectoryNotFoundException
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize)
   at System.IO.StreamReader..ctor(String path)
   at System.IO.File.OpenText(String path)
   at Avro.Test.SchemaNormalizationTests.ProvideFingerprintTestCases() in /Volumes/Data/projects/personal/github/Apache-Avro-Core/Avro.UnitTest/Schema/SchemaNormalizationTests.cs:line 53
Failed   TestEnumResolution("{\r\n  \"protocol\" : \"MyProtocol\",\r\n  \"namespace\" : \"com.foo\",\r\n  \"types\" : [ \r\n   {\r\n\t\"type\" : \"record\",\r\n\t\"name\" : \"A\",\r\n\t\"fields\" : [ { \"name\" : \"f1\", \"type\" : \"long\" } ]\r\n   },\r\n   {\r\n\t\"type\" : \"enum\",\r\n\t\"name\" : \"MyEnum\",\r\n\t\"symbols\" : [ \"A\", \"B\", \"C\" ]\r\n   },\r\n   {\r\n   \"type\": \"fixed\", \r\n   \"size\": 16, \r\n   \"name\": \"MyFixed\"\r\n   },\r\n   {\r\n\t\"type\" : \"record\",\r\n\t\"name\" : \"Z\",\r\n\t\"fields\" : \r\n\t\t\t[ \t\r\n\t\t\t\t{ \"name\" : \"myUInt\", \"type\" : [ \"int\", \"null\" ] },\r\n\t\t\t\t{ \"name\" : \"myULong\", \"type\" : [ \"long\", \"null\" ] },\r\n\t\t\t\t{ \"name\" : \"myUBool\", \"type\" : [ \"boolean\", \"null\" ] },\r\n\t\t\t\t{ \"name\" : \"myUDouble\", \"type\" : [ \"double\", \"null\" ] },\r\n\t\t\t\t{ \"name\" : \"myUFloat\", \"type\" : [ \"float\", \"null\" ] },\r\n\t\t\t\t{ \"name\" : \"myUBytes\", \"type\" : [ \"bytes\", \"null\" ] },\r\n\t\t\t\t{ \"name\" : \"myUString\", \"type\" : [ \"string\", \"null\" ] },\r\n\t\t\t\t\r\n\t\t\t\t{ \"name\" : \"myInt\", \"type\" : \"int\" },\r\n\t\t\t\t{ \"name\" : \"myLong\", \"type\" : \"long\" },\r\n\t\t\t\t{ \"name\" : \"myBool\", \"type\" : \"boolean\" },\r\n\t\t\t\t{ \"name\" : \"myDouble\", \"type\" : \"double\" },\r\n\t\t\t\t{ \"name\" : \"myFloat\", \"type\" : \"float\" },\r\n\t\t\t\t{ \"name\" : \"myBytes\", \"type\" : \"bytes\" },\r\n\t\t\t\t{ \"name\" : \"myString\", \"type\" : \"string\" },\r\n\t\t\t\t{ \"name\" : \"myNull\", \"type\" : \"null\" },\r\n\r\n\t\t\t\t{ \"name\" : \"myFixed\", \"type\" : \"MyFixed\" },\t\t\t\t\t\t\t\t\r\n\t\t\t\t{ \"name\" : \"myA\", \"type\" : \"A\" },\r\n\t\t\t\t{ \"name\" : \"myE\", \"type\" : \"MyEnum\" },\r\n\t\t\t\t{ \"name\" : \"myArray\", \"type\" : { \"type\" : \"array\", \"items\" : \"bytes\" } },\r\n\t\t\t\t{ \"name\" : \"myArray2\", \"type\" : { \"type\" : \"array\", \"items\" : { \"type\" : \"record\", \"name\" : \"newRec\", \"fields\" : [ { \"name\" : \"f1\", \"type\" : \"long\"} ] } } },\r\n\t\t\t\t{ \"name\" : \"myMap\", \"type\" : { \"type\" : \"map\", \"values\" : \"string\" } },\r\n\t\t\t\t{ \"name\" : \"myMap2\", \"type\" : { \"type\" : \"map\", \"values\" : \"newRec\" } },\r\n\t\t\t\t{ \"name\" : \"myObject\", \"type\" : [ \"MyEnum\", \"A\", \"null\" ] },\r\n                { \"name\" : \"myArray3\", \"type\" : { \"type\" : \"array\", \"items\" : { \"type\" : \"array\", \"items\" : [ \"double\", \"string\", \"null\" ] } } }\r\n\t\t\t]\r\n   } \r\n   ]\r\n}",System.Object[])
Error Message:
 Arguments provided for method with no parameters

Failed   TestOutput
Error Message:
 The sourceName specified on a TestCaseSourceAttribute must refer to a static field, property or method.

NUnit Adapter 3.9.0.0: Test execution complete

Total tests: 388. Passed: 382. Failed: 6. Skipped: 0.
Test execution time: 2.5940 Seconds

Avro fails to maintain Comparer on Dictionary<string, T>

Title is fairly explanatory. Built the minimum repro to demonstrate the problem.

Root cause appears to be that the Comparer isn't stored as part of the type information so that when we serialize we lose that info.

Example of the bug
Repro.cs.txt

Going to see if I can track this down further and fix it.

Difference between Apache-Avro-Core and Microsoft-Avro-Core

Hi,

I'm new to AVRO and i'm starting a new project in .NET CORE. For this i'm wondering if there is a fundamental difference between the Apache-Avro-Core version and the Microsoft-Avro-Core implementation you provided for .NET CORE support?

Are both of them supporting the same AVRO version or why do we need 2?

Kind regards and thanks for your assistance!

Create a .NET Core release on NuGet

This package is missing a NuGet release.

In addition, what's the state (in terms of readiness) of Avro on .NET Core?

It's a bit worrisome since looking at Apache Avro's NuGet page, the last release was in 2014. The release directly at apache.org seems old too since avrogen.exe prompts to install .NET 2.0 and the library itself (avro.dll) doesn't support .NET Core (.NET Standard 2.0 to be specific) either.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.