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); } }
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); } }