@AfterAll public static void stop() { StopWatch stopWatch = StopWatch.startForSplits(); try { logger.info("Stopping embedded mongod"); mongod.stop(); long stopMongodElapsedTime = stopWatch.split(); mongodExe.stop(); long stopMongoExeElapsedTime = stopWatch.split(); logger.info( "Stopped embedded Mongo in {}ms (stopMongodElapsedTime={}ms, stopMongoExeElapsedTime={}ms)", stopWatch.stop(), stopMongodElapsedTime, stopMongoExeElapsedTime); } catch (Exception ex) { logger.warn("Failed to stop embedded mongod!", ex); } }
@AfterAll public static void assertGeneratedDataSets() { File xmlDataSetWithAllTables = new File("target/exported/xml/allTables.xml"); assertThat(xmlDataSetWithAllTables).exists(); assertThat(contentOf(xmlDataSetWithAllTables)).contains("<USER ID=\"1\" NAME=\"@realpestano\"/>"); assertThat(contentOf(xmlDataSetWithAllTables)).contains("<USER ID=\"2\" NAME=\"@dbunit\"/>"); //xmlDataSetWithAllTables.delete(); File ymlDataSetWithAllTables = new File("target/exported/yml/allTables.yml"); assertThat(ymlDataSetWithAllTables).exists(); assertThat(contentOf(ymlDataSetWithAllTables)). contains("USER:" + NEW_LINE + " - ID: 1" + NEW_LINE + " NAME: \"@realpestano\"" + NEW_LINE + " - ID: 2" + NEW_LINE + " NAME: \"@dbunit\""); }
@AfterAll static void afterAll() { if (EXCLUDE_FROM_TRAVIS.VALUE) return; // delete all test files if (!testFolder.deleteDirectory()) { Thread thread = new Thread(new Runnable() { @Override public void run() { try { Thread.sleep(100); } catch (InterruptedException e) { e.printStackTrace(); } testFolder.deleteDirectory(); } }); thread.start(); } }
@AfterAll static void cleanup() throws IllegalArgumentException, IllegalAccessException, IOException { if (fileSystemField != null) { fileSystemField.set(null, defaultFileSystem); } if (fileSystem != null) { fileSystem.close(); } }
@AfterAll public static void stopMariaDB() { try { database.stop(); } catch (final ManagedProcessException e) { Logger.getLogger(ParticleEffectMetaMySQLControllerIT.class.getSimpleName()).log(Level.WARNING, "Failed to stop maria db.", e); } }
@AfterAll public static void stopMariaDB() { try { database.stop(); } catch (final ManagedProcessException e) { Logger.getLogger(PlayerMetaMySQLControllerIT.class.getSimpleName()).log(Level.WARNING, "Failed to stop mariadb.", e); } }
@AfterAll public static void stopMariaDB() { try { database.stop(); } catch (final ManagedProcessException e) { Logger.getLogger(PetMetaMySQLControllerIT.class.getSimpleName()).log(Level.WARNING, "Failed stop maria db.", e); } }
@AfterAll static void teardown() { clearProperty("sel.jup.chrome.latest.version"); clearProperty("sel.jup.firefox.latest.version"); clearProperty("sel.jup.opera.latest.version"); clearProperty("sel.jup.browser.list.from.docker.hub"); }
@AfterAll void teardown() { assertTrue(recordingFile.exists()); log.info("Deleting recording {} ... {}", recordingFile, recordingFile.delete()); clearProperty("sel.jup.recording"); }
@AfterAll void teardown() { setProperty("sel.jup.screenshot.at.the.end.of.tests", "false"); setProperty("sel.jup.screenshot.format", "png"); setProperty("sel.jup.output.folder", "."); assertTrue(imageName.exists()); imageName.delete(); }
@AfterAll public static void tearDown() { try { deleteDirectory(new File("build/resources/test/root/root2")); deleteDirectory(new File("build/resources/test/root/root3")); deleteDirectory(new File("build/resources/test/root/3c/5c/4e/b9093f3ec0b7ddcdd17238f65c82069f")); deleteDirectory(new File("build/resources/test/root/e6/50/6a/ab34e43eaed0238d4c256ec7e6c7879a")); } catch (final IOException ex) { // ignore } }
@AfterAll public static void tearDown() { try { deleteDirectory(resDir1); deleteDirectory(resDir10); } catch (final IOException ex) { // ignore errors } }
@AfterAll public static void stopMariaDB() { try { database.stop(); } catch (final ManagedProcessException e) { Logger.getLogger(StatsMySQLControllerTest.class.getSimpleName()).log(Level.WARNING, "Failed stop maria db.", e); } }
@AfterAll public static void stopMariaDB() { try { database.stop(); } catch (final ManagedProcessException e) { Logger.getLogger(PlayerMetaMySQLControllerTest.class.getSimpleName()).log(Level.WARNING, "Failed to stop mariadb.", e); } }
@AfterAll public static void allTemporaryFilesAreDeleted() { List<String> existingFiles = temporaryFilePaths .stream() .filter(temporaryFilePath -> Files.exists(Paths.get(temporaryFilePath))) .collect(Collectors.toList()); assertThat(existingFiles, empty()); }
@AfterAll public static void allTemporaryDirectoriesAreDeleted() { List<String> existingDirectories = temporaryDirectoryPaths .stream() .filter(temporaryFileDirectory -> Files.exists(Paths.get(temporaryFileDirectory))) .collect(Collectors.toList()); assertThat(existingDirectories, empty()); }
@AfterAll @AfterClass public static void close() { if (annotationConfigApplicationContext != null) { annotationConfigApplicationContext.stop(); annotationConfigApplicationContext.close(); annotationConfigApplicationContext.destroy(); annotationConfigApplicationContext = null; } }
@AfterAll public static void tearDown() throws Exception { if(server != null) { try { Thread.sleep(100); } catch (InterruptedException ignored) { } server.stop(); logger.info("The server is stopped."); } }
@AfterAll public static void tearDown() { boolean stopped = remoteController.stopSUT(); stopped = embeddedStarter.stop() && stopped; assertTrue(stopped); }
@AfterAll public static void after() throws InterruptedException { EntityManagerProvider.em().clear(); List<User> users = EntityManagerProvider.em().createQuery("select u from User u").getResultList(); if (users == null || users.size() != 1) { fail("We should have 1 user after test execution"); } User user = users.get(0);//after script deletes all users and insert one assertThat(user.getName()).isNotNull().isEqualTo("user-after"); }
@AfterAll public static void after(){ List<User> users = EntityManagerProvider.em().createQuery("select u from User u").getResultList(); if(users != null && !users.isEmpty()){ fail("users should be empty"); } }
@AfterAll static void verifyRegistrationAndDeregistration() { map.forEach((browser, eventListener) -> { EventSystem es = browser.events(); InOrder inOrder = Mockito.inOrder(es); inOrder.verify(es).register(eventListener); inOrder.verify(es).deregister(eventListener); inOrder.verifyNoMoreInteractions(); }); }
@AfterAll public static void oneTimeTearDown() { // destroy Yarn cluster miniCluster.stop(); // destroy HDFS cluster dfsCluster.shutdown(); }
@AfterAll public static void oneTimeTearDown() throws IOException { // destroy Spark cluster if (sc!=null) { sc.stop(); } // destroy HDFS cluster dfsCluster.shutdown(); }
@AfterAll void tearDownAll() { try { FileUtils.deleteDirectory( temporaryFolder ); } catch ( IOException e ) { e.printStackTrace(); } }
@AfterAll public static void finish(){ try { LOG.debug("Tests finished. Delete temp directory for tests."); FileUtils.deleteDirectory( tmpOutput.toFile() ); } catch (IOException e) { LOG.error("Cannot deleted tmp directory.", e); } }
@AfterAll public static void teardown() { deregisterTag(RequiredFields.class); deregisterTag(Mismatch.class); deregisterTag(Inner.class); deregisterTag(Outer.class); deregisterTag(ListContainer.class); }
@AfterAll public static void clearIdPs() throws Exception { if (!SAML2SPDetector.isSAML2SPAvailable()) { return; } saml2IdPService.list().forEach(idp -> { saml2IdPService.delete(idp.getKey()); }); Files.delete(keystorePath); Files.delete(truststorePath); }