コード例 #1
0
  @BeforeClass(alwaysRun = true)
  public void configureServer() throws Exception {
    super.init();
    String carbonHome = ServerConfigurationManager.getCarbonHome();
    userMgtServerFile =
        new File(
            carbonHome
                + File.separator
                + "repository"
                + File.separator
                + "conf"
                + File.separator
                + "user-mgt.xml");
    File userMgtConfigFile =
        new File(
            getISResourceLocation()
                + File.separator
                + "userMgt"
                + File.separator
                + "JdbcUserMgtConfig.xml");

    scm = new ServerConfigurationManager(automationContext);
    scm.applyConfiguration(userMgtConfigFile, userMgtServerFile, true, true);
    doInit();
  }
コード例 #2
0
 @AfterClass(alwaysRun = true)
 public void restoreServer() throws Exception {
   try {
     super.clean();
   } finally {
     scm.restoreToLastConfiguration();
   }
 }