Java 类org.junit.jupiter.api.AfterAll 实例源码

项目:dragoman    文件:AbstractMongoDBTest.java   
@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);
  }
}
项目:database-rider    文件:ExportDataSetJUnit5It.java   
@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\"");


}
项目:cachebox3.0    文件:HashAtlasWriterTest.java   
@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();
    }

}
项目:qpp-conversion-tool    文件:ParameterizedBenchmarkTest.java   
@AfterAll
static void cleanup() throws IllegalArgumentException, IllegalAccessException, IOException {
    if (fileSystemField != null) {
        fileSystemField.set(null, defaultFileSystem);
    }
    if (fileSystem != null) {
        fileSystem.close();
    }
}
项目:PetBlocks    文件:ParticleEffectMetaMySQLControllerIT.java   
@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);
    }
}
项目:PetBlocks    文件:PlayerMetaMySQLControllerIT.java   
@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);
    }
}
项目:PetBlocks    文件:PetMetaMySQLControllerIT.java   
@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);
    }
}
项目:selenium-jupiter    文件:SelenoidConfigTest.java   
@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");
}
项目:selenium-jupiter    文件:DockerRecordingJupiterTest.java   
@AfterAll
void teardown() {
    assertTrue(recordingFile.exists());
    log.info("Deleting recording {} ... {}", recordingFile,
            recordingFile.delete());
    clearProperty("sel.jup.recording");
}
项目:selenium-jupiter    文件:ScreenshotSurefireTest.java   
@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();
}
项目:trellis-rosid-file    文件:FileResourceServiceTest.java   
@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
    }
}
项目:trellis-rosid-file    文件:RDFPatchTest.java   
@AfterAll
public static void tearDown() {
    try {
        deleteDirectory(resDir1);
        deleteDirectory(resDir10);
    } catch (final IOException ex) {
        // ignore errors
    }
}
项目:BlockBall    文件:StatsMySQLControllerTest.java   
@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);
    }
}
项目:BlockBall    文件:PlayerMetaMySQLControllerTest.java   
@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);
    }
}
项目:junit-extensions    文件:TemporaryFolderExtensionParameterTest.java   
@AfterAll
public static void allTemporaryFilesAreDeleted() {
  List<String> existingFiles =
      temporaryFilePaths
          .stream()
          .filter(temporaryFilePath -> Files.exists(Paths.get(temporaryFilePath)))
          .collect(Collectors.toList());

  assertThat(existingFiles, empty());
}
项目:junit-extensions    文件:TemporaryFolderExtensionParameterTest.java   
@AfterAll
public static void allTemporaryDirectoriesAreDeleted() {
  List<String> existingDirectories =
      temporaryDirectoryPaths
          .stream()
          .filter(temporaryFileDirectory -> Files.exists(Paths.get(temporaryFileDirectory)))
          .collect(Collectors.toList());

  assertThat(existingDirectories, empty());
}
项目:junit-extensions    文件:TemporaryFolderExtensionFieldTest.java   
@AfterAll
public static void allTemporaryFilesAreDeleted() {
  List<String> existingFiles =
      temporaryFilePaths
          .stream()
          .filter(temporaryFilePath -> Files.exists(Paths.get(temporaryFilePath)))
          .collect(Collectors.toList());

  assertThat(existingFiles, empty());
}
项目:junit-extensions    文件:TemporaryFolderExtensionFieldTest.java   
@AfterAll
public static void allTemporaryDirectoriesAreDeleted() {
  List<String> existingDirectories =
      temporaryDirectoryPaths
          .stream()
          .filter(temporaryFileDirectory -> Files.exists(Paths.get(temporaryFileDirectory)))
          .collect(Collectors.toList());

  assertThat(existingDirectories, empty());
}
项目:trellis-rosid    文件:FileResourceServiceTest.java   
@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
    }
}
项目:trellis-rosid    文件:RDFPatchTest.java   
@AfterAll
public static void tearDown() {
    try {
        deleteDirectory(resDir1);
        deleteDirectory(resDir10);
    } catch (final IOException ex) {
        // ignore errors
    }
}
项目:fo-veilarbjobbsokerkompetanse    文件:AbstractIntegrasjonsTest.java   
@AfterAll
@AfterClass
public static void close() {
    if (annotationConfigApplicationContext != null) {
        annotationConfigApplicationContext.stop();
        annotationConfigApplicationContext.close();
        annotationConfigApplicationContext.destroy();
        annotationConfigApplicationContext = null;
    }
}
项目:light-session-4j    文件:JdbcSessionSingleTest.java   
@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.");
    }
}
项目:light-session-4j    文件:HazelCastSessionSingleTest.java   
@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.");
    }
}
项目:light-session-4j    文件:RedisSessionSingleIT.java   
@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.");
    }
}
项目:light-session-4j    文件:MapSessionManagerTest.java   
@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.");
    }
}
项目:EvoMaster    文件:RestTestBase.java   
@AfterAll
public static void tearDown() {

    boolean stopped = remoteController.stopSUT();
    stopped = embeddedStarter.stop() && stopped;

    assertTrue(stopped);
}
项目:database-rider    文件:ScriptsIt.java   
@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");
}
项目:database-rider    文件:CleanBeforeAfterIt.java   
@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");
    }
}
项目:webtester2-core    文件:RegisteredEventListenerExtensionIntTest.java   
@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();
    });
}
项目:hadoopoffice    文件:MapReduceExcelOutputIntegrationTest.java   
@AfterAll
   public static void oneTimeTearDown() {
    // destroy Yarn cluster
miniCluster.stop();
// destroy HDFS cluster
dfsCluster.shutdown();
     }
项目:hadoopoffice    文件:MapReduceExcelInputIntegrationTest.java   
@AfterAll
   public static void oneTimeTearDown() {
    // destroy Yarn cluster
miniCluster.stop();
// destroy HDFS cluster
dfsCluster.shutdown();
     }
项目:hadoopcryptoledger    文件:SparkBitcoinBlockCounterSparkMasterIntegrationTest.java   
@AfterAll
   public static void oneTimeTearDown() throws IOException {
      // destroy Spark cluster
if (sc!=null) {
    sc.stop();
}
// destroy HDFS cluster
dfsCluster.shutdown();
     }
项目:hadoopcryptoledger    文件:MapReduceBitcoinTransactionIntegrationTest.java   
@AfterAll
   public static void oneTimeTearDown() {
    // destroy Yarn cluster
miniCluster.stop();
// destroy HDFS cluster
dfsCluster.shutdown();
     }
项目:hadoopcryptoledger    文件:MapReduceEthereumBlockIntegrationTest.java   
@AfterAll
   public static void oneTimeTearDown() {
    // destroy Yarn cluster
miniCluster.stop();
// destroy HDFS cluster
dfsCluster.shutdown();
     }
项目:hadoopcryptoledger    文件:Spark2BitcoinBlockCounterSparkMasterIntegrationTest.java   
@AfterAll
   public static void oneTimeTearDown() throws IOException {
      // destroy Spark cluster
if (sc!=null) {
    sc.stop();
}
// destroy HDFS cluster
dfsCluster.shutdown();
     }
项目:hadoopcryptoledger    文件:MapReduceBitcoinBlockIntegrationTest.java   
@AfterAll
   public static void oneTimeTearDown() {
    // destroy Yarn cluster
miniCluster.stop();
// destroy HDFS cluster
dfsCluster.shutdown();
     }
项目:Kvantum    文件:GenericServerTest.java   
@AfterAll
void tearDownAll()
{
    try
    {

        FileUtils.deleteDirectory( temporaryFolder );
    } catch ( IOException e )
    {
        e.printStackTrace();
    }
}
项目:mathosphere    文件:GoldStandardSerializationTests.java   
@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);
    }
}
项目:dynamic-object    文件:ValidationTest.java   
@AfterAll
public static void teardown() {
    deregisterTag(RequiredFields.class);
    deregisterTag(Mismatch.class);
    deregisterTag(Inner.class);
    deregisterTag(Outer.class);
    deregisterTag(ListContainer.class);
}
项目:syncope    文件:SAML2ITCase.java   
@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);
}