コード例 #1
0
 public void writeConfigFile(CruiseConfig cruiseConfig) {
   try {
     ByteArrayOutputStream buffer = new ByteArrayOutputStream();
     getXml(cruiseConfig, buffer);
     cachedGoConfig.save(new String(buffer.toByteArray()), false);
   } catch (Exception e) {
     throw bomb(e);
   }
 }
コード例 #2
0
 public void onTearDown() {
   sysEnv.setProperty(SystemEnvironment.CONFIG_DIR_PROPERTY, originalConfigDir);
   FileUtils.deleteQuietly(configFile);
   try {
     cachedGoConfig.save(originalXml, true);
   } catch (Exception e) {
     throw new RuntimeException(e);
   }
 }