Github user cestella commented on a diff in the pull request:
https://github.com/apache/metron/pull/760#discussion_r139086639
--- Diff:
metron-platform/metron-common/src/main/java/org/apache/metron/common/configuration/ConfigurationsUtils.java
---
@@ -76,7 +80,7 @@ public static void writeProfilerConfigToZookeeper(byte[]
config, CuratorFramewor
}
public static void writeSensorParserConfigToZookeeper(String sensorType,
SensorParserConfig sensorParserConfig, String zookeeperUrl) throws Exception {
- writeSensorParserConfigToZookeeper(sensorType,
JSONUtils.INSTANCE.toJSON(sensorParserConfig), zookeeperUrl);
+ writeSensorParserConfigToZookeeper(sensorType,
JSONUtils.INSTANCE.toJSONPretty(sensorParserConfig), zookeeperUrl);
--- End diff --
So, I think the test is failing because you are pretty printing here.
`GlobalConfigServiceImplTest` functions are expecting to write out `{}` and
retrieve back literally `{}` and, yet, you are pretty printing, which would
yield `{ }`. I think what you're doing is fine, but you probably want to
adjust the failing `GlobalConfigServiceImplTest` cases to expect `{ }` rather
than `{}`.
---