mirror of https://github.com/apache/activemq.git
see to gets some more detailed info for jenkins intermittent failures of runtime config mods
This commit is contained in:
parent
0530aacff7
commit
4a01e40cb4
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue