Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
xerial committed Mar 21, 2024
1 parent 4b0c37d commit adf9dca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.SystemUtils;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.io.compress.SnappyCodec;
import org.junit.AfterClass;
Expand All @@ -25,13 +24,13 @@ public static void loadHadoopNativeLibrary() throws Exception
{
final String libResourceFolder;
Map<String, String> libraryNames = new LinkedHashMap<>();
if (SystemUtils.IS_OS_LINUX) {
if (OSInfo.getOSName() == "Linux") {
libResourceFolder = "/lib/Linux";
libraryNames.put("libhadoop.so", "libhadoop.so");
// certain Linux systems need these shared library be copied before the JVM started, see build.sbt
libraryNames.put("libsnappy.so", "libsnappy.so");
libraryNames.put("libsnappy.so.1", "libsnappy.so");
} else if (SystemUtils.IS_OS_MAC_OSX) {
} else if (OSInfo.getOSName() == "Mac") {
libResourceFolder = "/lib/MacOSX";
libraryNames.put("libhadoop.dylib", "libhadoop.dylib");
libraryNames.put("libsnappy.dylib", "libsnappy.dylib");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public void batchingOfWritesShouldNotAffectCompressedDataSize()
if (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN)
assertEquals(90992, expectedCompressedData.length);
else
assertEquals(91080, expectedCompressedData.length);
assertEquals(91051, expectedCompressedData.length);
// The chunk size should not affect the size of the compressed output:
int[] chunkSizes = new int[] {1, 100, 1023, 1024, 10000};
for (int chunkSize : chunkSizes) {
Expand Down

0 comments on commit adf9dca

Please sign in to comment.