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

Snappy unit tests fail on .net Core #200

@vchekan

Description

@vchekan

#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions