flume-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpe...@apache.org
Subject git commit: FLUME-2012. Two tests fail on Mac OS (saying they fail to load native library) with Java 7.
Date Fri, 26 Apr 2013 08:28:00 GMT
Updated Branches:
  refs/heads/flume-1.4 bcec83e90 -> 7652ad86d


FLUME-2012. Two tests fail on Mac OS (saying they fail to load native library) with Java 7.

(Thiruvalluvan M. G. via Mike Percy)


Project: http://git-wip-us.apache.org/repos/asf/flume/repo
Commit: http://git-wip-us.apache.org/repos/asf/flume/commit/7652ad86
Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/7652ad86
Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/7652ad86

Branch: refs/heads/flume-1.4
Commit: 7652ad86df548ddc7fa52a043315717692c8fbbb
Parents: bcec83e
Author: Mike Percy <mpercy@apache.org>
Authored: Fri Apr 26 01:25:58 2013 -0700
Committer: Mike Percy <mpercy@apache.org>
Committed: Fri Apr 26 01:27:45 2013 -0700

----------------------------------------------------------------------
 .../TestFlumeEventAvroEventSerializer.java         |    8 +++++++-
 .../TestSyslogAvroEventSerializer.java             |   10 ++++++++--
 2 files changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flume/blob/7652ad86/flume-ng-core/src/test/java/org/apache/flume/serialization/TestFlumeEventAvroEventSerializer.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/test/java/org/apache/flume/serialization/TestFlumeEventAvroEventSerializer.java
b/flume-ng-core/src/test/java/org/apache/flume/serialization/TestFlumeEventAvroEventSerializer.java
index cd50aa3..3860b5e 100644
--- a/flume-ng-core/src/test/java/org/apache/flume/serialization/TestFlumeEventAvroEventSerializer.java
+++ b/flume-ng-core/src/test/java/org/apache/flume/serialization/TestFlumeEventAvroEventSerializer.java
@@ -18,7 +18,6 @@
  */
 package org.apache.flume.serialization;
 
-import com.google.common.base.Charsets;
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
@@ -26,6 +25,7 @@ import java.io.IOException;
 import java.io.OutputStream;
 import java.nio.ByteBuffer;
 import java.nio.charset.CharsetDecoder;
+
 import org.apache.avro.file.DataFileReader;
 import org.apache.avro.generic.GenericData;
 import org.apache.avro.generic.GenericDatumReader;
@@ -35,8 +35,11 @@ import org.apache.commons.io.FileUtils;
 import org.apache.flume.Context;
 import org.apache.flume.event.EventBuilder;
 import org.junit.Assert;
+import org.junit.Assume;
 import org.junit.Test;
 
+import com.google.common.base.Charsets;
+
 public class TestFlumeEventAvroEventSerializer {
 
   private static final File TESTFILE =
@@ -72,6 +75,9 @@ public class TestFlumeEventAvroEventSerializer {
   @Test
   public void testAvroSerializerSnappyCompression()
       throws FileNotFoundException, IOException {
+    // Snappy currently broken on Mac in OpenJDK 7 per FLUME-2012
+    Assume.assumeTrue(!"Mac OS X".equals(System.getProperty("os.name")) ||
+      !System.getProperty("java.version").startsWith("1.7."));
 
     createAvroFile(TESTFILE, "snappy");
     validateAvroFile(TESTFILE);

http://git-wip-us.apache.org/repos/asf/flume/blob/7652ad86/flume-ng-core/src/test/java/org/apache/flume/serialization/TestSyslogAvroEventSerializer.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/test/java/org/apache/flume/serialization/TestSyslogAvroEventSerializer.java
b/flume-ng-core/src/test/java/org/apache/flume/serialization/TestSyslogAvroEventSerializer.java
index 5a42af2..7bd342a 100644
--- a/flume-ng-core/src/test/java/org/apache/flume/serialization/TestSyslogAvroEventSerializer.java
+++ b/flume-ng-core/src/test/java/org/apache/flume/serialization/TestSyslogAvroEventSerializer.java
@@ -18,14 +18,13 @@
  */
 package org.apache.flume.serialization;
 
-import com.google.common.base.Charsets;
-import com.google.common.collect.Lists;
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
 import java.util.List;
+
 import org.apache.avro.file.DataFileReader;
 import org.apache.avro.generic.GenericData;
 import org.apache.avro.generic.GenericDatumReader;
@@ -37,8 +36,12 @@ import org.apache.flume.Event;
 import org.apache.flume.event.EventBuilder;
 import org.apache.flume.source.SyslogUtils;
 import org.junit.Assert;
+import org.junit.Assume;
 import org.junit.Test;
 
+import com.google.common.base.Charsets;
+import com.google.common.collect.Lists;
+
 public class TestSyslogAvroEventSerializer {
 
   File testFile = new File("src/test/resources/SyslogEvents.avro");
@@ -70,6 +73,9 @@ public class TestSyslogAvroEventSerializer {
 
   @Test
   public void test() throws FileNotFoundException, IOException {
+    // Snappy currently broken on Mac in OpenJDK 7 per FLUME-2012
+    Assume.assumeTrue(!"Mac OS X".equals(System.getProperty("os.name")) ||
+      !System.getProperty("java.version").startsWith("1.7."));
 
     //Schema schema = new Schema.Parser().parse(schemaFile);
 


Mime
View raw message