You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streams.apache.org by sb...@apache.org on 2016/11/30 01:33:18 UTC

[1/3] incubator-streams git commit: STREAMS-458: GPlusTypeConverter fix + gplus converter integration testing - peer review update

Repository: incubator-streams
Updated Branches:
  refs/heads/master 10944954a -> 0151714bf


STREAMS-458: GPlusTypeConverter fix + gplus converter integration testing - peer review update


Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/ac60c5fa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/ac60c5fa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/ac60c5fa

Branch: refs/heads/master
Commit: ac60c5fae7c5a01100ed999f9df5e55899844de4
Parents: 6e5afce
Author: Steve Blackmon @steveblackmon <sb...@apache.org>
Authored: Sat Nov 26 08:47:59 2016 -0600
Committer: Steve Blackmon @steveblackmon <sb...@apache.org>
Committed: Tue Nov 29 19:25:02 2016 -0600

----------------------------------------------------------------------
 .../gplus/test/processors/GooglePlusTypeConverterIT.java    | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/ac60c5fa/streams-contrib/streams-provider-google/google-gplus/src/test/java/org/apache/streams/gplus/test/processors/GooglePlusTypeConverterIT.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-google/google-gplus/src/test/java/org/apache/streams/gplus/test/processors/GooglePlusTypeConverterIT.java b/streams-contrib/streams-provider-google/google-gplus/src/test/java/org/apache/streams/gplus/test/processors/GooglePlusTypeConverterIT.java
index 4fbdf68..098f555 100644
--- a/streams-contrib/streams-provider-google/google-gplus/src/test/java/org/apache/streams/gplus/test/processors/GooglePlusTypeConverterIT.java
+++ b/streams-contrib/streams-provider-google/google-gplus/src/test/java/org/apache/streams/gplus/test/processors/GooglePlusTypeConverterIT.java
@@ -31,7 +31,7 @@ import com.google.gplus.processor.GooglePlusTypeConverter;
 import com.google.gplus.serializer.util.GPlusActivityDeserializer;
 import com.google.gplus.serializer.util.GPlusPersonDeserializer;
 import com.google.gplus.serializer.util.GooglePlusActivityUtil;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.annotations.BeforeClass;
@@ -45,8 +45,9 @@ import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.util.List;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertTrue;
 
 /**
  * Tests conversion of gplus inputs to Activity
@@ -122,7 +123,7 @@ public class GooglePlusTypeConverterIT {
         GooglePlusActivityUtil.updateActivity(gPlusActivity, activity);
 
         assertEquals(retList.size(), 1);
-        assert(retList.get(0).getDocument() instanceof Activity);
+        assertTrue(retList.get(0).getDocument() instanceof Activity);
         assertEquals(activity, retList.get(0).getDocument());
       }
     }


[2/3] incubator-streams git commit: STREAMS-458: GPlusTypeConverter fails processing recent plus#person without a gender

Posted by sb...@apache.org.
STREAMS-458: GPlusTypeConverter fails processing recent plus#person without a gender

Run type converter on live-collected documents during integration test cycle.
Collect both a person and an organization.
Check that nodes are present before accessing them.


Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/6e5afce3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/6e5afce3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/6e5afce3

Branch: refs/heads/master
Commit: 6e5afce354c7d4e3535771ecdc49b0b604b22187
Parents: 1094495
Author: Steve Blackmon @steveblackmon <sb...@apache.org>
Authored: Fri Nov 25 20:18:42 2016 -0600
Committer: Steve Blackmon @steveblackmon <sb...@apache.org>
Committed: Tue Nov 29 19:25:02 2016 -0600

----------------------------------------------------------------------
 .../google-gplus/pom.xml                        |  10 +-
 .../util/GPlusActivityDeserializer.java         |  10 +-
 .../util/GPlusPersonDeserializer.java           |  34 +++--
 .../processor/GooglePlusTypeConverterTest.java  | 135 -------------------
 .../processors/GooglePlusTypeConverterIT.java   | 131 ++++++++++++++++++
 .../providers/GPlusUserActivityProviderIT.java  |   4 +-
 .../test/providers/GPlusUserDataProviderIT.java |   4 +-
 .../resources/GPlusUserActivityProviderIT.conf  |   5 +
 .../test/resources/GPlusUserDataProviderIT.conf |   5 +
 9 files changed, 180 insertions(+), 158 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6e5afce3/streams-contrib/streams-provider-google/google-gplus/pom.xml
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-google/google-gplus/pom.xml b/streams-contrib/streams-provider-google/google-gplus/pom.xml
index f91bc5f..1e80d88 100644
--- a/streams-contrib/streams-provider-google/google-gplus/pom.xml
+++ b/streams-contrib/streams-provider-google/google-gplus/pom.xml
@@ -116,6 +116,12 @@
             <artifactId>jcl-over-slf4j</artifactId>
         </dependency>
         <dependency>
+            <groupId>org.testng</groupId>
+            <artifactId>testng</artifactId>
+            <version>6.9.13.6</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-all</artifactId>
             <version>${mockito.version}</version>
@@ -234,10 +240,10 @@
                     <skipTests>${skipITs}</skipTests>
                 </configuration>
             </plugin>
-<plugin>
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-resources-plugin</artifactId>
-</plugin>
+            </plugin>
         </plugins>
     </build>
 </project>

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6e5afce3/streams-contrib/streams-provider-google/google-gplus/src/main/java/com/google/gplus/serializer/util/GPlusActivityDeserializer.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-google/google-gplus/src/main/java/com/google/gplus/serializer/util/GPlusActivityDeserializer.java b/streams-contrib/streams-provider-google/google-gplus/src/main/java/com/google/gplus/serializer/util/GPlusActivityDeserializer.java
index 7468de4..f04ab9b 100644
--- a/streams-contrib/streams-provider-google/google-gplus/src/main/java/com/google/gplus/serializer/util/GPlusActivityDeserializer.java
+++ b/streams-contrib/streams-provider-google/google-gplus/src/main/java/com/google/gplus/serializer/util/GPlusActivityDeserializer.java
@@ -157,10 +157,12 @@ public class GPlusActivityDeserializer extends JsonDeserializer<Activity> {
           attachments1.setUrl(attachmentNode.get("url").asText());
         }
 
-        Activity.PlusObject.Attachments.Image image1 = new Activity.PlusObject.Attachments.Image();
-        JsonNode imageNode1 = attachmentNode.get("image");
-        image1.setUrl(imageNode1.get("url").asText());
-        attachments1.setImage(image1);
+        if( attachmentNode.has("image")) {
+          Activity.PlusObject.Attachments.Image image1 = new Activity.PlusObject.Attachments.Image();
+          JsonNode imageNode1 = attachmentNode.get("image");
+          image1.setUrl(imageNode1.get("url").asText());
+          attachments1.setImage(image1);
+        }
 
         attachments.add(attachments1);
       }

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6e5afce3/streams-contrib/streams-provider-google/google-gplus/src/main/java/com/google/gplus/serializer/util/GPlusPersonDeserializer.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-google/google-gplus/src/main/java/com/google/gplus/serializer/util/GPlusPersonDeserializer.java b/streams-contrib/streams-provider-google/google-gplus/src/main/java/com/google/gplus/serializer/util/GPlusPersonDeserializer.java
index b7b4e24..19e1d76 100644
--- a/streams-contrib/streams-provider-google/google-gplus/src/main/java/com/google/gplus/serializer/util/GPlusPersonDeserializer.java
+++ b/streams-contrib/streams-provider-google/google-gplus/src/main/java/com/google/gplus/serializer/util/GPlusPersonDeserializer.java
@@ -29,6 +29,7 @@ import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.api.client.util.Lists;
 import com.google.api.services.plus.model.Person;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -59,18 +60,23 @@ public class GPlusPersonDeserializer extends JsonDeserializer<Person> {
     JsonNode node = jsonParser.getCodec().readTree(jsonParser);
     Person person = new Person();
     try {
-
-      person.setCircledByCount((Integer) (node.get("circledByCount")).numberValue());
-      person.setDisplayName(node.get("displayName").asText());
-      person.setEtag(node.get("etag").asText());
-      person.setGender(node.get("gender").asText());
       person.setId(node.get("id").asText());
+      person.setCircledByCount((Integer) ((IntNode) node.get("circledByCount")).numberValue());
+      person.setDisplayName(node.get("displayName").asText());
+      if( node.has("etag")) {
+        person.setEtag(node.get("etag").asText());
+      }
+      if( node.has("gender")) {
+        person.setGender(node.get("gender").asText());
+      }
 
       Person.Image image = new Person.Image();
-      JsonNode imageNode = node.get("image");
-      image.setIsDefault(imageNode.get("isDefault").asBoolean());
-      image.setUrl(imageNode.get("url").asText());
-      person.setImage(image);
+      if( node.has("image") ) {
+        JsonNode imageNode = node.get("image");
+        image.setIsDefault(imageNode.get("isDefault").asBoolean());
+        image.setUrl(imageNode.get("url").asText());
+        person.setImage(image);
+      }
 
       person.setIsPlusUser(node.get("isPlusUser").asBoolean());
       person.setKind(node.get("kind").asText());
@@ -82,11 +88,13 @@ public class GPlusPersonDeserializer extends JsonDeserializer<Person> {
       person.setObjectType(node.get("objectType").asText());
 
       List<Person.Organizations> organizations = Lists.newArrayList();
-      for (JsonNode orgNode : node.get("organizations")) {
-        Person.Organizations org = mapper.readValue(mapper.writeValueAsString(orgNode), Person.Organizations.class);
-        organizations.add(org);
+      if( node.has("organizations")) {
+        for (JsonNode orgNode : node.get("organizations")) {
+          Person.Organizations org = mapper.readValue(mapper.writeValueAsString(orgNode), Person.Organizations.class);
+          organizations.add(org);
+        }
+        person.setOrganizations(organizations);
       }
-      person.setOrganizations(organizations);
 
       person.setUrl(node.get("url").asText());
       person.setVerified(node.get("verified").asBoolean());

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6e5afce3/streams-contrib/streams-provider-google/google-gplus/src/test/java/com/google/gplus/processor/GooglePlusTypeConverterTest.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-google/google-gplus/src/test/java/com/google/gplus/processor/GooglePlusTypeConverterTest.java b/streams-contrib/streams-provider-google/google-gplus/src/test/java/com/google/gplus/processor/GooglePlusTypeConverterTest.java
deleted file mode 100644
index ebdeac6..0000000
--- a/streams-contrib/streams-provider-google/google-gplus/src/test/java/com/google/gplus/processor/GooglePlusTypeConverterTest.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package com.google.gplus.processor;
-
-import org.apache.streams.core.StreamsDatum;
-import org.apache.streams.exceptions.ActivitySerializerException;
-import org.apache.streams.jackson.StreamsJacksonMapper;
-import org.apache.streams.pojo.json.Activity;
-
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.module.SimpleModule;
-import com.google.api.services.plus.model.Person;
-import com.google.gplus.serializer.util.GPlusActivityDeserializer;
-import com.google.gplus.serializer.util.GPlusPersonDeserializer;
-import com.google.gplus.serializer.util.GooglePlusActivityUtil;
-import org.apache.commons.lang.StringUtils;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.List;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-/**
- * Tests conversion of gplus inputs to Activity.
- */
-@Ignore("ignore until test resources are available.")
-public class GooglePlusTypeConverterTest {
-  private static final Logger LOGGER = LoggerFactory.getLogger(GooglePlusTypeConverterTest.class);
-  private GooglePlusTypeConverter googlePlusTypeConverter;
-  private ObjectMapper objectMapper;
-
-  /**
-   * setup.
-   */
-  @Before
-  public void setup() {
-    objectMapper = StreamsJacksonMapper.getInstance();
-    SimpleModule simpleModule = new SimpleModule();
-    simpleModule.addDeserializer(Person.class, new GPlusPersonDeserializer());
-    simpleModule.addDeserializer(com.google.api.services.plus.model.Activity.class, new GPlusActivityDeserializer());
-    objectMapper.registerModule(simpleModule);
-    objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
-
-    googlePlusTypeConverter = new GooglePlusTypeConverter();
-    googlePlusTypeConverter.prepare(null);
-  }
-
-  @Test
-  public void testProcessPerson() throws IOException, ActivitySerializerException {
-    InputStream is = GooglePlusTypeConverterTest.class.getResourceAsStream("/google_plus_person_jsons.txt");
-    InputStreamReader isr = new InputStreamReader(is);
-    BufferedReader br = new BufferedReader(isr);
-
-    while (br.ready()) {
-      String line = br.readLine();
-      if (!StringUtils.isEmpty(line)) {
-        LOGGER.info("raw: {}", line);
-        Activity activity = new Activity();
-
-        Person person = objectMapper.readValue(line, Person.class);
-        StreamsDatum streamsDatum = new StreamsDatum(person);
-
-        assertNotNull(streamsDatum.getDocument());
-
-        List<StreamsDatum> retList = googlePlusTypeConverter.process(streamsDatum);
-        GooglePlusActivityUtil.updateActivity(person, activity);
-
-        assertEquals(retList.size(), 1);
-        assert (retList.get(0).getDocument() instanceof Activity);
-        assertEquals(activity, retList.get(0).getDocument());
-      }
-    }
-  }
-
-  @Test
-  public void testProcessActivity() throws IOException, ActivitySerializerException {
-    InputStream is = GooglePlusTypeConverterTest.class.getResourceAsStream("/google_plus_activity_jsons.txt");
-    InputStreamReader isr = new InputStreamReader(is);
-    BufferedReader br = new BufferedReader(isr);
-
-    while (br.ready()) {
-      String line = br.readLine();
-      if (!StringUtils.isEmpty(line)) {
-        LOGGER.info("raw: {}", line);
-        Activity activity = new Activity();
-
-        com.google.api.services.plus.model.Activity gPlusActivity =
-            objectMapper.readValue(line, com.google.api.services.plus.model.Activity.class);
-        StreamsDatum streamsDatum = new StreamsDatum(gPlusActivity);
-
-        assertNotNull(streamsDatum.getDocument());
-
-        List<StreamsDatum> retList = googlePlusTypeConverter.process(streamsDatum);
-        GooglePlusActivityUtil.updateActivity(gPlusActivity, activity);
-
-        assertEquals(retList.size(), 1);
-        assert (retList.get(0).getDocument() instanceof Activity);
-        assertEquals(activity, retList.get(0).getDocument());
-      }
-    }
-  }
-
-  @Test
-  public void testEmptyProcess() {
-    List<StreamsDatum> retList = googlePlusTypeConverter.process(null);
-
-    assertEquals(retList.size(), 0);
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6e5afce3/streams-contrib/streams-provider-google/google-gplus/src/test/java/org/apache/streams/gplus/test/processors/GooglePlusTypeConverterIT.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-google/google-gplus/src/test/java/org/apache/streams/gplus/test/processors/GooglePlusTypeConverterIT.java b/streams-contrib/streams-provider-google/google-gplus/src/test/java/org/apache/streams/gplus/test/processors/GooglePlusTypeConverterIT.java
new file mode 100644
index 0000000..4fbdf68
--- /dev/null
+++ b/streams-contrib/streams-provider-google/google-gplus/src/test/java/org/apache/streams/gplus/test/processors/GooglePlusTypeConverterIT.java
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.streams.gplus.test.processors;
+
+import org.apache.streams.core.StreamsDatum;
+import org.apache.streams.exceptions.ActivitySerializerException;
+import org.apache.streams.jackson.StreamsJacksonMapper;
+import org.apache.streams.pojo.json.Activity;
+
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import com.google.api.services.plus.model.Person;
+import com.google.gplus.processor.GooglePlusTypeConverter;
+import com.google.gplus.serializer.util.GPlusActivityDeserializer;
+import com.google.gplus.serializer.util.GPlusPersonDeserializer;
+import com.google.gplus.serializer.util.GooglePlusActivityUtil;
+import org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.Test;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+/**
+ * Tests conversion of gplus inputs to Activity
+ */
+public class GooglePlusTypeConverterIT {
+
+  private final static Logger LOGGER = LoggerFactory.getLogger(GooglePlusTypeConverterIT.class);
+  private GooglePlusTypeConverter googlePlusTypeConverter;
+  private ObjectMapper objectMapper;
+
+  @BeforeClass
+  public void setup() {
+    objectMapper = StreamsJacksonMapper.getInstance();
+    SimpleModule simpleModule = new SimpleModule();
+    simpleModule.addDeserializer(Person.class, new GPlusPersonDeserializer());
+    simpleModule.addDeserializer(com.google.api.services.plus.model.Activity.class, new GPlusActivityDeserializer());
+    objectMapper.registerModule(simpleModule);
+    objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+    googlePlusTypeConverter = new GooglePlusTypeConverter();
+    googlePlusTypeConverter.prepare(null);
+  }
+
+  @Test(dependsOnGroups={"testGPlusUserDataProvider"})
+  public void testProcessPerson() throws IOException, ActivitySerializerException {
+
+    File file = new File("target/test-classes/GPlusUserDataProviderIT.stdout.txt");
+    InputStream is = new FileInputStream(file);
+    InputStreamReader isr = new InputStreamReader(is);
+    BufferedReader br = new BufferedReader(isr);
+
+    while (br.ready()) {
+      String line = br.readLine();
+      if (!StringUtils.isEmpty(line)) {
+        LOGGER.info("raw: {}", line);
+        Activity activity = new Activity();
+
+        Person person = objectMapper.readValue(line, Person.class);
+        StreamsDatum streamsDatum = new StreamsDatum(person);
+
+        assertNotNull(streamsDatum.getDocument());
+
+        List<StreamsDatum> retList = googlePlusTypeConverter.process(streamsDatum);
+        GooglePlusActivityUtil.updateActivity(person, activity);
+
+        assertEquals(retList.size(), 1);
+        assert(retList.get(0).getDocument() instanceof Activity);
+        assertEquals(activity, retList.get(0).getDocument());
+      }
+    }
+  }
+
+  @Test(dependsOnGroups={"testGPlusUserActivityProvider"})
+  public void testProcessActivity() throws IOException, ActivitySerializerException{
+
+    File file = new File("target/test-classes/GPlusUserActivityProviderIT.stdout.txt");
+    InputStream is = new FileInputStream(file);
+    InputStreamReader isr = new InputStreamReader(is);
+    BufferedReader br = new BufferedReader(isr);
+
+    while (br.ready()) {
+      String line = br.readLine();
+      if (!StringUtils.isEmpty(line)) {
+        LOGGER.info("raw: {}", line);
+        Activity activity = new Activity();
+
+        com.google.api.services.plus.model.Activity gPlusActivity = objectMapper.readValue(line, com.google.api.services.plus.model.Activity.class);
+        StreamsDatum streamsDatum = new StreamsDatum(gPlusActivity);
+
+        assertNotNull(streamsDatum.getDocument());
+
+        List<StreamsDatum> retList = googlePlusTypeConverter.process(streamsDatum);
+        GooglePlusActivityUtil.updateActivity(gPlusActivity, activity);
+
+        assertEquals(retList.size(), 1);
+        assert(retList.get(0).getDocument() instanceof Activity);
+        assertEquals(activity, retList.get(0).getDocument());
+      }
+    }
+  }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6e5afce3/streams-contrib/streams-provider-google/google-gplus/src/test/java/org/apache/streams/gplus/test/providers/GPlusUserActivityProviderIT.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-google/google-gplus/src/test/java/org/apache/streams/gplus/test/providers/GPlusUserActivityProviderIT.java b/streams-contrib/streams-provider-google/google-gplus/src/test/java/org/apache/streams/gplus/test/providers/GPlusUserActivityProviderIT.java
index 4b642ab..ab57ab3 100644
--- a/streams-contrib/streams-provider-google/google-gplus/src/test/java/org/apache/streams/gplus/test/providers/GPlusUserActivityProviderIT.java
+++ b/streams-contrib/streams-provider-google/google-gplus/src/test/java/org/apache/streams/gplus/test/providers/GPlusUserActivityProviderIT.java
@@ -19,9 +19,9 @@
 package org.apache.streams.gplus.test.providers;
 
 import com.google.gplus.provider.GPlusUserActivityProvider;
-import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.testng.annotations.Test;
 
 import java.io.File;
 import java.io.FileReader;
@@ -31,7 +31,7 @@ public class GPlusUserActivityProviderIT {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(GPlusUserActivityProviderIT.class);
 
-  @Test
+  @Test(groups={"testGPlusUserActivityProvider"})
   public void testGPlusUserActivityProvider() throws Exception {
 
     String configfile = "./target/test-classes/GPlusUserActivityProviderIT.conf";

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6e5afce3/streams-contrib/streams-provider-google/google-gplus/src/test/java/org/apache/streams/gplus/test/providers/GPlusUserDataProviderIT.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-google/google-gplus/src/test/java/org/apache/streams/gplus/test/providers/GPlusUserDataProviderIT.java b/streams-contrib/streams-provider-google/google-gplus/src/test/java/org/apache/streams/gplus/test/providers/GPlusUserDataProviderIT.java
index fd4ddd5..39da75d 100644
--- a/streams-contrib/streams-provider-google/google-gplus/src/test/java/org/apache/streams/gplus/test/providers/GPlusUserDataProviderIT.java
+++ b/streams-contrib/streams-provider-google/google-gplus/src/test/java/org/apache/streams/gplus/test/providers/GPlusUserDataProviderIT.java
@@ -20,7 +20,7 @@ package org.apache.streams.gplus.test.providers;
 
 import com.google.common.collect.Lists;
 import com.google.gplus.provider.GPlusUserDataProvider;
-import org.junit.Test;
+import org.testng.annotations.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -32,7 +32,7 @@ public class GPlusUserDataProviderIT {
 
   private static final Logger LOGGER = LoggerFactory.getLogger(GPlusUserDataProviderIT.class);
 
-  @Test
+  @Test(groups={"testGPlusUserDataProvider"})
   public void testGPlusUserDataProvider() throws Exception {
 
     String configfile = "./target/test-classes/GPlusUserDataProviderIT.conf";

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6e5afce3/streams-contrib/streams-provider-google/google-gplus/src/test/resources/GPlusUserActivityProviderIT.conf
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-google/google-gplus/src/test/resources/GPlusUserActivityProviderIT.conf b/streams-contrib/streams-provider-google/google-gplus/src/test/resources/GPlusUserActivityProviderIT.conf
index 0dbd065..629ecad 100644
--- a/streams-contrib/streams-provider-google/google-gplus/src/test/resources/GPlusUserActivityProviderIT.conf
+++ b/streams-contrib/streams-provider-google/google-gplus/src/test/resources/GPlusUserActivityProviderIT.conf
@@ -15,8 +15,13 @@
 # under the License.
 gplus {
   googlePlusUsers = [
+    # organization
     {
       userId = "+apache"
+    },
+    # person
+    {
+      userId = "+SteveBlackmon"
     }
   ]
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/6e5afce3/streams-contrib/streams-provider-google/google-gplus/src/test/resources/GPlusUserDataProviderIT.conf
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-google/google-gplus/src/test/resources/GPlusUserDataProviderIT.conf b/streams-contrib/streams-provider-google/google-gplus/src/test/resources/GPlusUserDataProviderIT.conf
index 0dbd065..629ecad 100644
--- a/streams-contrib/streams-provider-google/google-gplus/src/test/resources/GPlusUserDataProviderIT.conf
+++ b/streams-contrib/streams-provider-google/google-gplus/src/test/resources/GPlusUserDataProviderIT.conf
@@ -15,8 +15,13 @@
 # under the License.
 gplus {
   googlePlusUsers = [
+    # organization
     {
       userId = "+apache"
+    },
+    # person
+    {
+      userId = "+SteveBlackmon"
     }
   ]
 }
\ No newline at end of file


[3/3] incubator-streams git commit: STREAMS-458: GPlus Person Deserializer - fix conflict merge problem

Posted by sb...@apache.org.
STREAMS-458: GPlus Person Deserializer - fix conflict merge problem


Project: http://git-wip-us.apache.org/repos/asf/incubator-streams/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-streams/commit/0151714b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-streams/tree/0151714b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-streams/diff/0151714b

Branch: refs/heads/master
Commit: 0151714bf9a3feec9e0d0ca92d8598e90d07ac62
Parents: ac60c5f
Author: Steve Blackmon @steveblackmon <sb...@apache.org>
Authored: Tue Nov 29 19:33:09 2016 -0600
Committer: Steve Blackmon @steveblackmon <sb...@apache.org>
Committed: Tue Nov 29 19:33:09 2016 -0600

----------------------------------------------------------------------
 .../com/google/gplus/serializer/util/GPlusPersonDeserializer.java   | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-streams/blob/0151714b/streams-contrib/streams-provider-google/google-gplus/src/main/java/com/google/gplus/serializer/util/GPlusPersonDeserializer.java
----------------------------------------------------------------------
diff --git a/streams-contrib/streams-provider-google/google-gplus/src/main/java/com/google/gplus/serializer/util/GPlusPersonDeserializer.java b/streams-contrib/streams-provider-google/google-gplus/src/main/java/com/google/gplus/serializer/util/GPlusPersonDeserializer.java
index 19e1d76..871e15b 100644
--- a/streams-contrib/streams-provider-google/google-gplus/src/main/java/com/google/gplus/serializer/util/GPlusPersonDeserializer.java
+++ b/streams-contrib/streams-provider-google/google-gplus/src/main/java/com/google/gplus/serializer/util/GPlusPersonDeserializer.java
@@ -27,6 +27,7 @@ import com.fasterxml.jackson.databind.DeserializationContext;
 import com.fasterxml.jackson.databind.JsonDeserializer;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.IntNode;
 import com.google.api.client.util.Lists;
 import com.google.api.services.plus.model.Person;