Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Snappy unit tests fail on .net Core #200

Open
vchekan opened this issue Dec 21, 2017 · 1 comment
Open

Snappy unit tests fail on .net Core #200

vchekan opened this issue Dec 21, 2017 · 1 comment

Comments

@vchekan
Copy link

vchekan commented Dec 21, 2017

#dotnetcore

On linux with .net core 2.0.2 installed, run build.sh.
Build will succeed, but unit tests will fail with message:

    /home/vadim/projects/kafunk/tests/kafunk.Tests/bin/Release/Kafunk.Tests.dll


Errors, Failures and Warnings

1) Error : CompressionTests.Compression.Snappy reads messages that are compatible with reference implementation
System.TypeInitializationException : The type initializer for 'Snappy.NativeProxy' threw an exception.
  ----> System.DllNotFoundException : kernel32

Investigation shows that Snappy.NET is packaged with 32 and 64 versions of snappy.dll in order to dynamically load appropriate library and avoid native dependency management. Windows kernel32:LoadLibrary function is used, which fails on windows.
https://bitbucket.org/robertvazan/snappy.net/src/ffa7e8165ae7e2ec5e8384b21a9b406ad972c3f1/Snappy.NET/NativeProxy.cs?at=default&fileviewer=file-view-default#NativeProxy.cs-49

It should be easy to detect non-windows environment and load "snappy.so" on linux.
I'll try to fix Snappy.NET and will sent patch upstream.

@eulerfx
Copy link
Contributor

eulerfx commented Dec 22, 2017

Sounds good, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants