[
https://issues.apache.org/jira/browse/APEXMALHAR-2006?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15287940#comment-15287940
]
ASF GitHub Bot commented on APEXMALHAR-2006:
--------------------------------------------
Github user tweise commented on a diff in the pull request:
https://github.com/apache/incubator-apex-malhar/pull/261#discussion_r63626578
--- Diff:
stream/src/test/java/org/apache/apex/malhar/stream/sample/ApplicationWithStreamAPITest.java
---
@@ -0,0 +1,53 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.apex.malhar.stream.sample;
+
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.hadoop.conf.Configuration;
+
+import com.datatorrent.api.LocalMode;
+
+/**
+ * A application test using stream api
+ */
+public class ApplicationWithStreamAPITest
+{
+ private static final Logger logger =
LoggerFactory.getLogger(ApplicationWithStreamAPITest.class);
+
+ public ApplicationWithStreamAPITest()
+ {
+ }
+
+ @Test
+ public void testWordcountApplication() throws Exception
+ {
+ LocalMode lma = LocalMode.newInstance();
+ Configuration conf = new Configuration(false);
+ lma.prepareDAG(new ApplicationWithStreamAPI(), conf);
+ LocalMode.Controller lc = lma.getController();
+ long start = System.currentTimeMillis();
+ lc.run(5000);
--- End diff --
This isn't really a useful test. Options I could think of:
1) Just generate the DAG and check it is as expected (no need to run it)
2) Run it and check results
> Stream API Design
> -----------------
>
> Key: APEXMALHAR-2006
> URL: https://issues.apache.org/jira/browse/APEXMALHAR-2006
> Project: Apache Apex Malhar
> Issue Type: Sub-task
> Reporter: Siyuan Hua
> Assignee: Siyuan Hua
> Fix For: 3.4.0
>
>
> Construct DAG in a similar way as Flink/Spark Streaming
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)