You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ge...@apache.org on 2014/03/31 16:30:19 UTC
[1/3] git commit: SM-2255: Add logging to troubleshoot intermittent
test failure
Repository: servicemix
Updated Branches:
refs/heads/master 904689d59 -> 111751f59
refs/heads/servicemix-5.0.x 707d1584d -> e564caf84
refs/heads/servicemix-5.1.x 262991e6a -> 4e01a14e1
SM-2255: Add logging to troubleshoot intermittent test failure
Project: http://git-wip-us.apache.org/repos/asf/servicemix/repo
Commit: http://git-wip-us.apache.org/repos/asf/servicemix/commit/e564caf8
Tree: http://git-wip-us.apache.org/repos/asf/servicemix/tree/e564caf8
Diff: http://git-wip-us.apache.org/repos/asf/servicemix/diff/e564caf8
Branch: refs/heads/servicemix-5.0.x
Commit: e564caf84bec1c215f94aeb089b10ac23c0c50d7
Parents: 707d158
Author: Gert Vanthienen <ge...@apache.org>
Authored: Mon Mar 31 16:09:57 2014 +0200
Committer: Gert Vanthienen <ge...@apache.org>
Committed: Mon Mar 31 16:09:57 2014 +0200
----------------------------------------------------------------------
examples/akka/akka-camel/pom.xml | 6 ++
.../src/test/resources/application.conf | 66 ++++++++++++++++++++
.../servicemix/examples/akka/StatsTest.scala | 10 ++-
3 files changed, 79 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/servicemix/blob/e564caf8/examples/akka/akka-camel/pom.xml
----------------------------------------------------------------------
diff --git a/examples/akka/akka-camel/pom.xml b/examples/akka/akka-camel/pom.xml
index feca813..b4b0d2f 100644
--- a/examples/akka/akka-camel/pom.xml
+++ b/examples/akka/akka-camel/pom.xml
@@ -73,6 +73,12 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>com.typesafe.akka</groupId>
+ <artifactId>akka-slf4j_2.10</artifactId>
+ <version>${akka.version}</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
http://git-wip-us.apache.org/repos/asf/servicemix/blob/e564caf8/examples/akka/akka-camel/src/test/resources/application.conf
----------------------------------------------------------------------
diff --git a/examples/akka/akka-camel/src/test/resources/application.conf b/examples/akka/akka-camel/src/test/resources/application.conf
new file mode 100644
index 0000000..9891d75
--- /dev/null
+++ b/examples/akka/akka-camel/src/test/resources/application.conf
@@ -0,0 +1,66 @@
+################################################################################
+#
+# 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.
+#
+################################################################################
+
+akka {
+ actor.deployment {
+ # there's no extra configuration here at the moment, but you could
+ # configure routers, log levels, ... or whatever settings you need
+ # for your own application
+
+ }
+
+ # This is a copy of the akka-camel reference.conf
+ # TODO: work out a better solution (extender to load configs from reference.conf into the OSGi Service Registry)
+ camel {
+ # Whether JMX should be enabled or disabled for the Camel Context
+ jmx = off
+ # enable/disable streaming cache on the Camel Context
+ streamingCache = on
+ consumer {
+ # Configured setting which determines whether one-way communications
+ # between an endpoint and this consumer actor
+ # should be auto-acknowledged or application-acknowledged.
+ # This flag has only effect when exchange is in-only.
+ auto-ack = on
+
+ # When endpoint is out-capable (can produce responses) reply-timeout is the
+ # maximum time the endpoint can take to send the response before the message
+ # exchange fails. This setting is used for out-capable, in-only,
+ # manually acknowledged communication
+ reply-timeout = 1m
+
+ # The duration of time to await activation of an endpoint.
+ activation-timeout = 10s
+ }
+
+ #Scheme to FQCN mappings for CamelMessage body conversions
+ conversions {
+ "file" = "java.io.InputStream"
+ }
+ }
+
+ loggers = ["akka.event.slf4j.Slf4jLogger"]
+ loglevel = DEBUG
+
+ debug {
+ lifecyle = on
+ event-stream = on
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/servicemix/blob/e564caf8/examples/akka/akka-camel/src/test/scala/org/apache/servicemix/examples/akka/StatsTest.scala
----------------------------------------------------------------------
diff --git a/examples/akka/akka-camel/src/test/scala/org/apache/servicemix/examples/akka/StatsTest.scala b/examples/akka/akka-camel/src/test/scala/org/apache/servicemix/examples/akka/StatsTest.scala
index f390d6e..a433327 100644
--- a/examples/akka/akka-camel/src/test/scala/org/apache/servicemix/examples/akka/StatsTest.scala
+++ b/examples/akka/akka-camel/src/test/scala/org/apache/servicemix/examples/akka/StatsTest.scala
@@ -24,6 +24,7 @@ import akka.util.Timeout
import scala.concurrent.duration._
import scala.concurrent.Await
import org.apache.servicemix.examples.akka.Stats.{Input, Report}
+import org.slf4j.LoggerFactory
import java.util.concurrent.TimeoutException
/**
@@ -33,6 +34,7 @@ class StatsTest {
val ITEM1 = "ITEM1"
val MAX_ATTEMPTS = 10
+ val LOGGER = LoggerFactory.getLogger(classOf[StatsTest])
val system = ActorSystem("TestSystem")
val stats = Stats(system)
@@ -54,7 +56,7 @@ class StatsTest {
def expectReport(expectation: String) : Unit = expectReport(expectation, MAX_ATTEMPTS)
def expectReport(expectation: String, remaining: Int) : Unit = getReport.contains(expectation) match {
- case true => // do nothing here, w received our report
+ case true => // do nothing here, we received our report
case false if (remaining <= 0) => fail("Did not receive reporting containing " + expectation)
case false => expectReport(expectation, remaining - 1)
}
@@ -64,10 +66,12 @@ class StatsTest {
*/
def getReport : String = {
try {
- Await.result(stats ? Report(), 100 millis).toString
+ val result = Await.result(stats ? Report(), 100 millis).toString
+ LOGGER.debug("Report() message returned '{}'", result)
+ result
} catch {
//Report() only sends back a response if it actually has something to tell
- case e: TimeoutException => ""
+ case e: TimeoutException => LOGGER.debug("Report() message returned no response"); ""
}
}
}
[3/3] git commit: SM-2255: Add logging to troubleshoot intermittent
test failure
Posted by ge...@apache.org.
SM-2255: Add logging to troubleshoot intermittent test failure
(cherry picked from commit e564caf84bec1c215f94aeb089b10ac23c0c50d7)
Project: http://git-wip-us.apache.org/repos/asf/servicemix/repo
Commit: http://git-wip-us.apache.org/repos/asf/servicemix/commit/111751f5
Tree: http://git-wip-us.apache.org/repos/asf/servicemix/tree/111751f5
Diff: http://git-wip-us.apache.org/repos/asf/servicemix/diff/111751f5
Branch: refs/heads/master
Commit: 111751f59d8c0887265fa55649527cb7ac08319a
Parents: 904689d
Author: Gert Vanthienen <ge...@apache.org>
Authored: Mon Mar 31 16:09:57 2014 +0200
Committer: Gert Vanthienen <ge...@apache.org>
Committed: Mon Mar 31 16:17:45 2014 +0200
----------------------------------------------------------------------
examples/akka/akka-camel/pom.xml | 6 ++
.../src/test/resources/application.conf | 66 ++++++++++++++++++++
.../servicemix/examples/akka/StatsTest.scala | 10 ++-
3 files changed, 79 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/servicemix/blob/111751f5/examples/akka/akka-camel/pom.xml
----------------------------------------------------------------------
diff --git a/examples/akka/akka-camel/pom.xml b/examples/akka/akka-camel/pom.xml
index 103e1cb..2da2f99 100644
--- a/examples/akka/akka-camel/pom.xml
+++ b/examples/akka/akka-camel/pom.xml
@@ -73,6 +73,12 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>com.typesafe.akka</groupId>
+ <artifactId>akka-slf4j_2.10</artifactId>
+ <version>${akka.version}</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
http://git-wip-us.apache.org/repos/asf/servicemix/blob/111751f5/examples/akka/akka-camel/src/test/resources/application.conf
----------------------------------------------------------------------
diff --git a/examples/akka/akka-camel/src/test/resources/application.conf b/examples/akka/akka-camel/src/test/resources/application.conf
new file mode 100644
index 0000000..9891d75
--- /dev/null
+++ b/examples/akka/akka-camel/src/test/resources/application.conf
@@ -0,0 +1,66 @@
+################################################################################
+#
+# 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.
+#
+################################################################################
+
+akka {
+ actor.deployment {
+ # there's no extra configuration here at the moment, but you could
+ # configure routers, log levels, ... or whatever settings you need
+ # for your own application
+
+ }
+
+ # This is a copy of the akka-camel reference.conf
+ # TODO: work out a better solution (extender to load configs from reference.conf into the OSGi Service Registry)
+ camel {
+ # Whether JMX should be enabled or disabled for the Camel Context
+ jmx = off
+ # enable/disable streaming cache on the Camel Context
+ streamingCache = on
+ consumer {
+ # Configured setting which determines whether one-way communications
+ # between an endpoint and this consumer actor
+ # should be auto-acknowledged or application-acknowledged.
+ # This flag has only effect when exchange is in-only.
+ auto-ack = on
+
+ # When endpoint is out-capable (can produce responses) reply-timeout is the
+ # maximum time the endpoint can take to send the response before the message
+ # exchange fails. This setting is used for out-capable, in-only,
+ # manually acknowledged communication
+ reply-timeout = 1m
+
+ # The duration of time to await activation of an endpoint.
+ activation-timeout = 10s
+ }
+
+ #Scheme to FQCN mappings for CamelMessage body conversions
+ conversions {
+ "file" = "java.io.InputStream"
+ }
+ }
+
+ loggers = ["akka.event.slf4j.Slf4jLogger"]
+ loglevel = DEBUG
+
+ debug {
+ lifecyle = on
+ event-stream = on
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/servicemix/blob/111751f5/examples/akka/akka-camel/src/test/scala/org/apache/servicemix/examples/akka/StatsTest.scala
----------------------------------------------------------------------
diff --git a/examples/akka/akka-camel/src/test/scala/org/apache/servicemix/examples/akka/StatsTest.scala b/examples/akka/akka-camel/src/test/scala/org/apache/servicemix/examples/akka/StatsTest.scala
index f390d6e..a433327 100644
--- a/examples/akka/akka-camel/src/test/scala/org/apache/servicemix/examples/akka/StatsTest.scala
+++ b/examples/akka/akka-camel/src/test/scala/org/apache/servicemix/examples/akka/StatsTest.scala
@@ -24,6 +24,7 @@ import akka.util.Timeout
import scala.concurrent.duration._
import scala.concurrent.Await
import org.apache.servicemix.examples.akka.Stats.{Input, Report}
+import org.slf4j.LoggerFactory
import java.util.concurrent.TimeoutException
/**
@@ -33,6 +34,7 @@ class StatsTest {
val ITEM1 = "ITEM1"
val MAX_ATTEMPTS = 10
+ val LOGGER = LoggerFactory.getLogger(classOf[StatsTest])
val system = ActorSystem("TestSystem")
val stats = Stats(system)
@@ -54,7 +56,7 @@ class StatsTest {
def expectReport(expectation: String) : Unit = expectReport(expectation, MAX_ATTEMPTS)
def expectReport(expectation: String, remaining: Int) : Unit = getReport.contains(expectation) match {
- case true => // do nothing here, w received our report
+ case true => // do nothing here, we received our report
case false if (remaining <= 0) => fail("Did not receive reporting containing " + expectation)
case false => expectReport(expectation, remaining - 1)
}
@@ -64,10 +66,12 @@ class StatsTest {
*/
def getReport : String = {
try {
- Await.result(stats ? Report(), 100 millis).toString
+ val result = Await.result(stats ? Report(), 100 millis).toString
+ LOGGER.debug("Report() message returned '{}'", result)
+ result
} catch {
//Report() only sends back a response if it actually has something to tell
- case e: TimeoutException => ""
+ case e: TimeoutException => LOGGER.debug("Report() message returned no response"); ""
}
}
}
[2/3] git commit: SM-2255: Add logging to troubleshoot intermittent
test failure
Posted by ge...@apache.org.
SM-2255: Add logging to troubleshoot intermittent test failure
(cherry picked from commit e564caf84bec1c215f94aeb089b10ac23c0c50d7)
Project: http://git-wip-us.apache.org/repos/asf/servicemix/repo
Commit: http://git-wip-us.apache.org/repos/asf/servicemix/commit/4e01a14e
Tree: http://git-wip-us.apache.org/repos/asf/servicemix/tree/4e01a14e
Diff: http://git-wip-us.apache.org/repos/asf/servicemix/diff/4e01a14e
Branch: refs/heads/servicemix-5.1.x
Commit: 4e01a14e1c1d515df7d0fd158a2d40f78a1ec70b
Parents: 262991e
Author: Gert Vanthienen <ge...@apache.org>
Authored: Mon Mar 31 16:09:57 2014 +0200
Committer: Gert Vanthienen <ge...@apache.org>
Committed: Mon Mar 31 16:17:29 2014 +0200
----------------------------------------------------------------------
examples/akka/akka-camel/pom.xml | 6 ++
.../src/test/resources/application.conf | 66 ++++++++++++++++++++
.../servicemix/examples/akka/StatsTest.scala | 10 ++-
3 files changed, 79 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/servicemix/blob/4e01a14e/examples/akka/akka-camel/pom.xml
----------------------------------------------------------------------
diff --git a/examples/akka/akka-camel/pom.xml b/examples/akka/akka-camel/pom.xml
index 84ad9c0..e562461 100644
--- a/examples/akka/akka-camel/pom.xml
+++ b/examples/akka/akka-camel/pom.xml
@@ -73,6 +73,12 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>com.typesafe.akka</groupId>
+ <artifactId>akka-slf4j_2.10</artifactId>
+ <version>${akka.version}</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
http://git-wip-us.apache.org/repos/asf/servicemix/blob/4e01a14e/examples/akka/akka-camel/src/test/resources/application.conf
----------------------------------------------------------------------
diff --git a/examples/akka/akka-camel/src/test/resources/application.conf b/examples/akka/akka-camel/src/test/resources/application.conf
new file mode 100644
index 0000000..9891d75
--- /dev/null
+++ b/examples/akka/akka-camel/src/test/resources/application.conf
@@ -0,0 +1,66 @@
+################################################################################
+#
+# 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.
+#
+################################################################################
+
+akka {
+ actor.deployment {
+ # there's no extra configuration here at the moment, but you could
+ # configure routers, log levels, ... or whatever settings you need
+ # for your own application
+
+ }
+
+ # This is a copy of the akka-camel reference.conf
+ # TODO: work out a better solution (extender to load configs from reference.conf into the OSGi Service Registry)
+ camel {
+ # Whether JMX should be enabled or disabled for the Camel Context
+ jmx = off
+ # enable/disable streaming cache on the Camel Context
+ streamingCache = on
+ consumer {
+ # Configured setting which determines whether one-way communications
+ # between an endpoint and this consumer actor
+ # should be auto-acknowledged or application-acknowledged.
+ # This flag has only effect when exchange is in-only.
+ auto-ack = on
+
+ # When endpoint is out-capable (can produce responses) reply-timeout is the
+ # maximum time the endpoint can take to send the response before the message
+ # exchange fails. This setting is used for out-capable, in-only,
+ # manually acknowledged communication
+ reply-timeout = 1m
+
+ # The duration of time to await activation of an endpoint.
+ activation-timeout = 10s
+ }
+
+ #Scheme to FQCN mappings for CamelMessage body conversions
+ conversions {
+ "file" = "java.io.InputStream"
+ }
+ }
+
+ loggers = ["akka.event.slf4j.Slf4jLogger"]
+ loglevel = DEBUG
+
+ debug {
+ lifecyle = on
+ event-stream = on
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/servicemix/blob/4e01a14e/examples/akka/akka-camel/src/test/scala/org/apache/servicemix/examples/akka/StatsTest.scala
----------------------------------------------------------------------
diff --git a/examples/akka/akka-camel/src/test/scala/org/apache/servicemix/examples/akka/StatsTest.scala b/examples/akka/akka-camel/src/test/scala/org/apache/servicemix/examples/akka/StatsTest.scala
index f390d6e..a433327 100644
--- a/examples/akka/akka-camel/src/test/scala/org/apache/servicemix/examples/akka/StatsTest.scala
+++ b/examples/akka/akka-camel/src/test/scala/org/apache/servicemix/examples/akka/StatsTest.scala
@@ -24,6 +24,7 @@ import akka.util.Timeout
import scala.concurrent.duration._
import scala.concurrent.Await
import org.apache.servicemix.examples.akka.Stats.{Input, Report}
+import org.slf4j.LoggerFactory
import java.util.concurrent.TimeoutException
/**
@@ -33,6 +34,7 @@ class StatsTest {
val ITEM1 = "ITEM1"
val MAX_ATTEMPTS = 10
+ val LOGGER = LoggerFactory.getLogger(classOf[StatsTest])
val system = ActorSystem("TestSystem")
val stats = Stats(system)
@@ -54,7 +56,7 @@ class StatsTest {
def expectReport(expectation: String) : Unit = expectReport(expectation, MAX_ATTEMPTS)
def expectReport(expectation: String, remaining: Int) : Unit = getReport.contains(expectation) match {
- case true => // do nothing here, w received our report
+ case true => // do nothing here, we received our report
case false if (remaining <= 0) => fail("Did not receive reporting containing " + expectation)
case false => expectReport(expectation, remaining - 1)
}
@@ -64,10 +66,12 @@ class StatsTest {
*/
def getReport : String = {
try {
- Await.result(stats ? Report(), 100 millis).toString
+ val result = Await.result(stats ? Report(), 100 millis).toString
+ LOGGER.debug("Report() message returned '{}'", result)
+ result
} catch {
//Report() only sends back a response if it actually has something to tell
- case e: TimeoutException => ""
+ case e: TimeoutException => LOGGER.debug("Report() message returned no response"); ""
}
}
}