[
https://issues.apache.org/jira/browse/EAGLE-818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15718245#comment-15718245
]
ASF GitHub Bot commented on EAGLE-818:
--------------------------------------
Github user haoch commented on a diff in the pull request:
https://github.com/apache/incubator-eagle/pull/709#discussion_r90759186
--- Diff:
eagle-core/eagle-app/eagle-app-base/src/test/java/org/apache/eagle/app/stream/CEPFunctionTest.java
---
@@ -29,22 +30,31 @@
public void testSiddhiFunction() {
CEPFunction function = new CEPFunction(
"define stream inputStream (name string, value double);\n "
- + "from inputStream#window.timeBatch( 1 min ) \n" +
+ + "from inputStream#window.timeBatch( 10 sec ) \n" +
"select name, avg(value) as avgValue\n" +
"group by name \n" +
"insert into outputStream ",
"inputStream","outputStream");
Collector collector = new Collector() {
@Override
public void collect(Object key, Map event) {
-
+
Assert.assertTrue(Double.valueOf(event.get("avgValue").toString()) == 0.97);
--- End diff --
Could we just
`Assert.assertTrue(event.get("avgValue"), 0.97);` to validate both value
and type.
> CEP Based Aggregate Framework
> -----------------------------
>
> Key: EAGLE-818
> URL: https://issues.apache.org/jira/browse/EAGLE-818
> Project: Eagle
> Issue Type: Improvement
> Affects Versions: v0.5.0
> Reporter: Zhao, Qingwen
> Assignee: Zhao, Qingwen
> Fix For: v0.5.0
>
>
> Implementation of CEP based aggregate framework
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)