Github user chinmaykolhatkar commented on a diff in the pull request:
https://github.com/apache/apex-malhar/pull/348#discussion_r72059197
--- Diff:
library/src/test/java/com/datatorrent/lib/formatter/JsonFormatterTest.java ---
@@ -182,14 +173,19 @@ public void testJSONToPOJONoFieldPOJO()
Assert.assertEquals(0, validDataSink.collectedTuples.size());
Assert.assertEquals(1, invalidDataSink.collectedTuples.size());
Assert.assertEquals(o, invalidDataSink.collectedTuples.get(0));
+ Assert.assertEquals(1, operator.getIncomingTuplesCount());
+ Assert.assertEquals(0, operator.getEmittedObjectCount());
+ Assert.assertEquals(1, operator.getErrorTupleCount());
}
public static class Test1Pojo
{
public int a;
public long b;
+ @JsonProperty("c2")
public String c;
public List<String> d;
+ @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy/MM/dd")
--- End diff --
The reason why local test is passing and travis is failing because, the
timezones in which the Date object is generated. The string that you're
matching against is based on your local time zone.
But when the Date object is created in travis, the build machine is in
different time zone.
Please make the test timezone agnostic.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---