This is an automated email from the ASF dual-hosted git repository.

karthikz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git


The following commit(s) were added to refs/heads/master by this push:
     new 056ba11  fixing test (#2894)
056ba11 is described below

commit 056ba114543a5f24c261375f2308556694c0e852
Author: Josh Fischer <j...@joshfischer.io>
AuthorDate: Tue May 8 01:09:18 2018 -0500

    fixing test (#2894)
---
 .../org/apache/heron/eco/parser/EcoParserTest.java | 89 +++++++++++++++++++++-
 1 file changed, 88 insertions(+), 1 deletion(-)

diff --git a/eco/tests/java/org/apache/heron/eco/parser/EcoParserTest.java 
b/eco/tests/java/org/apache/heron/eco/parser/EcoParserTest.java
index 9e665b7..30c41e1 100644
--- a/eco/tests/java/org/apache/heron/eco/parser/EcoParserTest.java
+++ b/eco/tests/java/org/apache/heron/eco/parser/EcoParserTest.java
@@ -16,7 +16,94 @@
  * 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 = "# 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: \"org.apache.heron.sample.TestWordSpout\"\n"
+      + "    parallelism: 1\n"
+      + "\n"
+      + "# bolt definitions\n"
+      + "bolts:\n"
+      + "  - id: \"bolt-1\"\n"
+      + "    className: \"org.apache.heron.sample.TestWordCounter\"\n"
+      + "    parallelism: 2\n"
+      + "\n"
+      + "  - id: \"bolt-2\"\n"
+      + "    className: \"org.apache.heron.sample.LogInfoBolt\"\n"
+      + "    parallelism: 1\n"
+      + "\n"
+      + "#stream definitions\n"
+      + "# stream definitions define connections between spouts and bolts.\n"
+      + "# note that such connections can be cyclical\n"
+      + "streams:\n"
+      + "  - name: \"spout-1 --> bolt-1\" # name isn't used (placeholder for 
logging, UI, etc.)\n"
+      + "    id: \"connection-1\"\n"
+      + "    from: \"spout-1\"\n"
+      + "    to: \"bolt-1\"\n"
+      + "    grouping:\n"
+      + "      type: FIELDS\n"
+      + "      args: [\"word\"]\n"
+      + "\n"
+      + "  - name: \"bolt-1 --> bolt2\"\n"
+      + "    id: \"connection-2\"\n"
+      + "    from: \"bolt-1\"\n"
+      + "    to: \"bolt-2\"\n"
+      + "    grouping:\n"
+      + "      type: SHUFFLE";
+  private static final String YAML_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"

-- 
To stop receiving notification emails like this one, please contact
karth...@apache.org.

Reply via email to