[
https://issues.apache.org/jira/browse/STREAMS-611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16646756#comment-16646756
]
ASF GitHub Bot commented on STREAMS-611:
steveblackmon closed pull request #460: STREAMS-611: Failing integration tests
in streams-provider-google-gplus
URL: https://github.com/apache/streams/pull/460
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/streams-contrib/streams-provider-google/google-gplus/src/main/java/org/apache/streams/gplus/serializer/util/GPlusActivityDeserializer.java
b/streams-contrib/streams-provider-google/google-gplus/src/main/java/org/apache/streams/gplus/serializer/util/GPlusActivityDeserializer.java
index 585e511e30..a01161d3a7 100644
---
a/streams-contrib/streams-provider-google/google-gplus/src/main/java/org/apache/streams/gplus/serializer/util/GPlusActivityDeserializer.java
+++
b/streams-contrib/streams-provider-google/google-gplus/src/main/java/org/apache/streams/gplus/serializer/util/GPlusActivityDeserializer.java
@@ -59,7 +59,9 @@ public Activity deserialize(JsonParser jsonParser,
DeserializationContext deseri
try {
activity.setUrl(node.get("url").asText());
activity.setEtag(node.get("etag").asText());
- activity.setTitle(node.get("title").asText());
+ if( node.has("title") ) {
+activity.setTitle(node.get("title").asText());
+ }
activity.setPublished(DateTime.parseRfc3339(node.get("published").asText()));
activity.setUpdated(DateTime.parseRfc3339(node.get("updated").asText()));
activity.setId(node.get("id").asText());
@@ -86,9 +88,13 @@ public Activity deserialize(JsonParser jsonParser,
DeserializationContext deseri
JsonNode actorNode = node.get("actor");
actor.setId(actorNode.get("id").asText());
-actor.setDisplayName(actorNode.get("displayName").asText());
-actor.setUrl(actorNode.get("url").asText());
-
+if( actorNode.has("displayName") ) {
+ actor.setDisplayName(actorNode.get("displayName").asText());
+}
+if( actorNode.has("url") ) {
+ actor.setUrl(actorNode.get("url").asText());
+}
+
Activity.Actor.Image image = new Activity.Actor.Image();
JsonNode imageNode = actorNode.get("image");
image.setUrl(imageNode.get("url").asText());
@@ -108,7 +114,9 @@ public Activity deserialize(JsonParser jsonParser,
DeserializationContext deseri
Activity.PlusObject object = new Activity.PlusObject();
JsonNode objectNode = node.get("object");
object.setObjectType(objectNode.get("objectType").asText());
-object.setContent(objectNode.get("content").asText());
+if( node.has("content") ) {
+ object.setContent(objectNode.get("content").asText());
+}
object.setUrl(objectNode.get("url").asText());
Activity.PlusObject.Replies replies = new Activity.PlusObject.Replies();
diff --git
a/streams-contrib/streams-provider-google/google-gplus/src/test/java/org/apache/streams/gplus/processors/GooglePlusActivitySerDeIT.java
b/streams-contrib/streams-provider-google/google-gplus/src/test/java/org/apache/streams/gplus/processors/GooglePlusActivitySerDeIT.java
index 60bc7449c4..a427392b0d 100644
---
a/streams-contrib/streams-provider-google/google-gplus/src/test/java/org/apache/streams/gplus/processors/GooglePlusActivitySerDeIT.java
+++
b/streams-contrib/streams-provider-google/google-gplus/src/test/java/org/apache/streams/gplus/processors/GooglePlusActivitySerDeIT.java
@@ -106,7 +106,6 @@ public void testActivityObjects() {
assertNotNull(actor.getUrl());
assertNotNull(activity.getPublished());
- assertNotNull(activity.getTitle());
assertNotNull(activity.getUrl());
Map extensions =
ExtensionUtil.getInstance().getExtensions(activity);
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org
> Failing integration tests in streams-provider-google-gplus
> --
>
> Key: STREAMS-611
> URL: https://issues.apache.org/jira/browse/STREAMS-611
> Project: Streams
> Issue Type: Task
>Reporter: Steve Blackmon
>Assignee: Steve Blackmon
>Priority: Major
> Fix For: 0.6.1
>
>
> I encountered failing integration tests in streams-provider-google-gplus
> building apache-streams-0.6.0-rc2.
> On debugging, the cause seems to be ce