activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject [2/2] git commit: see to gets some more detailed info for jenkins intermittent failures of runtime config mods
Date Tue, 01 Oct 2013 23:31:59 GMT
see to gets some more detailed info for jenkins intermittent failures of runtime config mods


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/4a01e40c
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/4a01e40c
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/4a01e40c

Branch: refs/heads/trunk
Commit: 4a01e40cb40f82b10f794ea5466f751eedf7f7f9
Parents: 0530aac
Author: gtully <gary.tully@gmail.com>
Authored: Wed Oct 2 00:31:11 2013 +0100
Committer: gtully <gary.tully@gmail.com>
Committed: Wed Oct 2 00:31:11 2013 +0100

----------------------------------------------------------------------
 .../apache/activemq/plugin/RuntimeConfigurationBroker.java    | 2 +-
 .../java/org/apache/activemq/RuntimeConfigTestSupport.java    | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/4a01e40c/activemq-runtime-config/src/main/java/org/apache/activemq/plugin/RuntimeConfigurationBroker.java
----------------------------------------------------------------------
diff --git a/activemq-runtime-config/src/main/java/org/apache/activemq/plugin/RuntimeConfigurationBroker.java
b/activemq-runtime-config/src/main/java/org/apache/activemq/plugin/RuntimeConfigurationBroker.java
index e39e0cb..476dff7 100644
--- a/activemq-runtime-config/src/main/java/org/apache/activemq/plugin/RuntimeConfigurationBroker.java
+++ b/activemq-runtime-config/src/main/java/org/apache/activemq/plugin/RuntimeConfigurationBroker.java
@@ -220,7 +220,7 @@ public class RuntimeConfigurationBroker extends BrokerFilter {
                     if (configToMonitor.lastModified() > lastModified) {
                         applyModifications(configToMonitor);
                     }
-                } catch (IOException e) {
+                } catch (Throwable e) {
                     LOG.error("Failed to determine lastModified time on configuration: "
+ configToMonitor, e);
                 }
             }

http://git-wip-us.apache.org/repos/asf/activemq/blob/4a01e40c/activemq-runtime-config/src/test/java/org/apache/activemq/RuntimeConfigTestSupport.java
----------------------------------------------------------------------
diff --git a/activemq-runtime-config/src/test/java/org/apache/activemq/RuntimeConfigTestSupport.java
b/activemq-runtime-config/src/test/java/org/apache/activemq/RuntimeConfigTestSupport.java
index c4df0a3..44afa58 100644
--- a/activemq-runtime-config/src/test/java/org/apache/activemq/RuntimeConfigTestSupport.java
+++ b/activemq-runtime-config/src/test/java/org/apache/activemq/RuntimeConfigTestSupport.java
@@ -52,11 +52,14 @@ public class RuntimeConfigTestSupport {
 
     protected void applyNewConfig(String configName, String newConfigName, long sleep) throws
Exception {
         Resource resource = Utils.resourceFromString("org/apache/activemq");
-        FileOutputStream current = new FileOutputStream(new File(resource.getFile(), configName
+ ".xml"));
+        File file = new File(resource.getFile(), configName + ".xml");
+        FileOutputStream current = new FileOutputStream(file);
         FileInputStream modifications = new FileInputStream(new File(resource.getFile(),
newConfigName + ".xml"));
         modifications.getChannel().transferTo(0, Long.MAX_VALUE, current.getChannel());
         current.flush();
-        LOG.info("Updated: " + current.getChannel());
+        current.close();
+        modifications.close();
+        LOG.info("Updated: " + file);
 
         if (sleep > 0) {
             // wait for mods to kick in


Mime
View raw message