CombinedConfiguration config =
createMultiFileConfig("testCCMultiTenentReloading.xml");
File outFile =
ConfigurationAssert.getOutFile("MultiFileReloadingTest.xml");
switchToMultiFile(outFile.getAbsolutePath());
XMLConfiguration reloadConfig = new XMLConfiguration();
FileHandler handler = new FileHandler(reloadConfig);
handler.setFile(outFile);
final String key = "test.reload";
reloadConfig.setProperty(key, "no");
handler.save();
try
{
assertEquals("Wrong property", "no", config.getString(key));
ConfigurationBuilder<? extends Configuration> childBuilder =
builder.getNamedBuilder("clientConfig");
assertTrue("Not a reloading builder",
childBuilder instanceof ReloadingControllerSupport);
ReloadingController ctrl =
((ReloadingControllerSupport) childBuilder)
.getReloadingController();
ctrl.checkForReloading(null); // initialize reloading
BuilderEventListenerImpl l = new BuilderEventListenerImpl();
childBuilder.addEventListener(ConfigurationBuilderEvent.RESET, l);
reloadConfig.setProperty(key, "yes");
handler.save();
int attempts = 10;
boolean changeDetected;
do