You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2019/01/08 08:49:37 UTC

[camel] 02/06: disable jmx and add test results

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

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit ebd0060cf031447f2d634e626ec583c392f7440d
Author: fvaleri <fv...@localhost>
AuthorDate: Wed Jan 2 14:02:26 2019 +0100

    disable jmx and add test results
---
 examples/camel-example-billboard-aggr/README.md    | 31 +++++++++++++++++++---
 .../camel/example/billboard/BillboardAggrTest.java |  8 ++++++
 2 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/examples/camel-example-billboard-aggr/README.md b/examples/camel-example-billboard-aggr/README.md
index 15b05d5..c7af822 100644
--- a/examples/camel-example-billboard-aggr/README.md
+++ b/examples/camel-example-billboard-aggr/README.md
@@ -1,17 +1,42 @@
 # Billboard TOP100 aggregation example
 
+### Introduction
 The `billboard_lyrics_1964-2015` CSV dataset contains the TOP100 songs with lyrics for each year.  
-We can easily compute the TOP20 artists using Split and Aggregate EIPs along with streaming and parallel processing.
+We can compute the TOP20 artists with most songs on Billboard using Split and Aggregate EIPs (streaming and parallel processing).  
+Build statistics is not the Camel core business but, as shown, you can easily do it!
 
-### Build and run
+This is the final result:
+
+Artist | Presences 
+--- | ---
+madonna | 35
+elton john | 26
+mariah carey | 25
+stevie wonder | 22
+janet jackson | 22
+michael jackson | 22
+whitney houston | 19
+rihanna | 19
+taylor swift | 19
+pink | 17
+the beatles | 17
+kelly clarkson | 17
+britney spears | 16
+the black eyed peas | 16
+chicago | 15
+usher | 14
+rod stewart | 14
+aretha franklin | 14
+katy perry | 14
+phil collins | 13
 
+### Build and run
 Build and run the test with this single command.
 ```sh
 mvn clean test
 ```
 
 ### Forum, Help, etc
-
 If you hit an problems please let us know on the Camel Forums
 	<http://camel.apache.org/discussion-forums.html>
 
diff --git a/examples/camel-example-billboard-aggr/src/test/java/org/apache/camel/example/billboard/BillboardAggrTest.java b/examples/camel-example-billboard-aggr/src/test/java/org/apache/camel/example/billboard/BillboardAggrTest.java
index 2e16493..d628154 100644
--- a/examples/camel-example-billboard-aggr/src/test/java/org/apache/camel/example/billboard/BillboardAggrTest.java
+++ b/examples/camel-example-billboard-aggr/src/test/java/org/apache/camel/example/billboard/BillboardAggrTest.java
@@ -27,6 +27,7 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.model.dataformat.BindyType;
 import org.apache.camel.AggregationStrategy;
+import org.apache.camel.CamelContext;
 import org.apache.camel.test.junit4.CamelTestSupport;
 
 import org.junit.Test;
@@ -36,6 +37,13 @@ public class BillboardAggrTest extends CamelTestSupport {
     private final static String basePath = System.getProperty("user.dir") + "/target/test-classes/data";
 
     @Override
+    protected CamelContext createCamelContext() throws Exception {
+        CamelContext ctx = super.createCamelContext();
+        ctx.disableJMX();
+        return ctx;
+    }
+
+    @Override
     protected int getShutdownTimeout() {
         return 300;
     }