/** @throws java.lang.Exception */ @AfterClass public static void tearDownAfterClass() throws Exception { TimeSync ts = TimeSync.getInstance(); ts.shutdown(); ts.waitForShutdown(); }
public void shutdown() { Logging.logMessage(Logging.LEVEL_DEBUG, this, "shutting down testEnv..."); if (enabledServs.contains(Services.MRC) && mrc != null) { try { mrc.shutdown(); } catch (Throwable th) { th.printStackTrace(); } } if (enabledServs.contains(Services.OSD)) { try { for (TestOSD osd : osds.values()) { if (osd != null && osd.started) { osd.shutdown(); } } } catch (Throwable th) { th.printStackTrace(); } } if (enabledServs.contains(Services.UUID_RESOLVER)) { try { UUIDResolver.shutdown(); } catch (Throwable th) { } } if (enabledServs.contains(Services.DIR_SERVICE) && dirService != null) { try { dirService.shutdown(); dirService.waitForShutdown(); } catch (Throwable th) { th.printStackTrace(); } } try { getRpcClient().shutdown(); getRpcClient().waitForShutdown(); } catch (Throwable th) { th.printStackTrace(); } if (enabledServs.contains(Services.TIME_SYNC)) { try { tsInstance = TimeSync.getInstance(); if (tsInstance != null) { tsInstance.shutdown(); tsInstance.waitForShutdown(); } } catch (Throwable th) { } } // cleanup File testDir = new File(SetupUtils.TEST_DIR); // FSUtils.delTree(testDir); }