You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@heron.apache.org by GitBox <gi...@apache.org> on 2018/05/05 05:40:28 UTC

[GitHub] nwangtw commented on a change in pull request #2892: fixing eco parser test

nwangtw commented on a change in pull request #2892: fixing eco parser test
URL: https://github.com/apache/incubator-heron/pull/2892#discussion_r186253366
 
 

 ##########
 File path: eco/tests/java/org/apache/heron/eco/parser/EcoParserTest.java
 ##########
 @@ -16,7 +16,114 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-\n"
+package org.apache.heron.eco.parser;
+import java.io.ByteArrayInputStream;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.util.List;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.powermock.api.mockito.PowerMockito;
+
+import org.apache.heron.eco.definition.BeanDefinition;
+import org.apache.heron.eco.definition.BeanReference;
+import org.apache.heron.eco.definition.BoltDefinition;
+import org.apache.heron.eco.definition.EcoTopologyDefinition;
+import org.apache.heron.eco.definition.GroupingDefinition;
+import org.apache.heron.eco.definition.PropertyDefinition;
+import org.apache.heron.eco.definition.StreamDefinition;
+
+import static junit.framework.TestCase.assertNotNull;
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.*;
+
+
+/**
+ * Unit tests for {@link EcoParser}
+ */
+public class EcoParserTest {
+
+
+  private static final String BOLT_1 = "bolt-1";
+  private static final String BOLT_2 = "bolt-2";
+  private static final String YAML_NO_CONFIG_STR = "# Licensed to the Apache Software Foundation"
+      + " (ASF) under one\n"
+      + "# or more contributor license agreements.  See the NOTICE file\n"
+      + "# distributed with this work for additional information\n"
+      + "# regarding copyright ownership.  The ASF licenses this file\n"
+      + "# to you under the Apache License, Version 2.0 (the\n"
+      + "# \"License\"); you may not use this file except in compliance\n"
+      + "# with the License.  You may obtain a copy of the License at\n"
+      + "#\n"
+      + "# http://www.apache.org/licenses/LICENSE-2.0\n"
+      + "#\n"
+      + "# Unless required by applicable law or agreed to in writing, software\n"
+      + "# distributed under the License is distributed on an \"AS IS\" BASIS,\n"
+      + "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n"
+      + "# See the License for the specific language governing permissions and\n"
+      + "# limitations under the License.\n"
+      + "\n"
+      + "---\n"
+      + "\n"
+      + "# topology definition\n"
+      + "# name to be used when submitting\n"
+      + "name: \"yaml-topology\"\n"
+      + "\n"
+      + "# topology configuration\n"
+      + "# this will be passed to the submitter as a map of config options\n"
+      + "#\n"
+      + "# spout definitions\n"
+      + "spouts:\n"
+      + "  - id: \"spout-1\"\n"
+      + "    className: \"com.twitter.heron.sample.TestWordSpout\"\n"
 
 Review comment:
   And these package names?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services