@Before public void init() throws Exception { properties = new ServerProperties(); initServerStructures(); FileUtils.deleteDirectory(holder.fileManager.getDataDir().toFile()); appServer = new AppServer(holder); ProfileSaverWorker profileSaverWorker = new ProfileSaverWorker(holder.userDao, holder.fileManager); appServer.start(); new Thread(profileSaverWorker).start(); // wait util servers start. // todo fix. Thread.sleep(500); }
@After public void shutdown() { appServer.stop(); }