Github user ilooner commented on a diff in the pull request:

    
https://github.com/apache/incubator-apex-malhar/pull/100#discussion_r45016459
  
    --- Diff: 
library/src/test/java/com/datatorrent/lib/appdata/snapshot/AppDataSnapshotServerTagsSupportTest.java
 ---
    @@ -0,0 +1,67 @@
    +package com.datatorrent.lib.appdata.snapshot;
    +
    +import org.codehaus.jettison.json.JSONArray;
    +import org.codehaus.jettison.json.JSONObject;
    +import org.junit.Assert;
    +import org.junit.Test;
    +
    +import com.google.common.collect.Sets;
    +
    +import com.datatorrent.lib.appdata.gpo.GPOMutable;
    +import com.datatorrent.lib.appdata.schemas.Schema;
    +import com.datatorrent.lib.appdata.schemas.SchemaResult;
    +import com.datatorrent.lib.appdata.schemas.SchemaUtils;
    +
    +public class AppDataSnapshotServerTagsSupportTest
    +{
    +  public static class AppDataSnapshotServerSchemaExport extends 
AbstractAppDataSnapshotServer<Object>
    +  {
    +    SchemaResult schemaResult;
    +    String schemaResultJSON;
    +
    +    @Override
    +    public GPOMutable convert(Object inputEvent)
    +    {
    +      return null;
    +    }
    +
    +    @Override
    +    public void endWindow()
    +    {
    +      while ((schemaResult = schemaQueue.poll()) != null) {
    +        schemaResultJSON = resultSerializerFactory.serialize(schemaResult);
    +        queryResult.emit(schemaResultJSON);
    +      }
    +
    +      queryProcessor.endWindow();
    +    }
    +  }
    +
    +  private static final String schemaLocation = 
"satisfactionRatingSnapshotSchema_test.json";
    +  private static final String TAG = "bulletin";
    +
    +  @Test
    +  public void testSchema() throws Exception
    --- End diff --
    
    Please add a test for a predifined schema string 
satisfactionRatingSnapshotSchema_test_2.json
    
    {
      "tags":["something"],
      "values": [
        {"name": "current", "type": "long", "tags": ["current"]}, 
        {"name": "min", "type": "long", "tags": ["min"]}, 
        {"name": "max", "type": "long", "tags": ["max"]}, 
        {"name": "threshold", "type": "long", "tags": ["threshold"]}
      ]
    }


---
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.
---

Reply via email to