From 78d7f17a1bfb4ce879e256024800af79b106d733 Mon Sep 17 00:00:00 2001 From: johnniang Date: Thu, 30 May 2019 23:37:51 +0800 Subject: [PATCH] Resolve test error --- src/test/java/run/halo/app/utils/GitTest.java | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/test/java/run/halo/app/utils/GitTest.java b/src/test/java/run/halo/app/utils/GitTest.java index 93bfbc752..83c36ab00 100644 --- a/src/test/java/run/halo/app/utils/GitTest.java +++ b/src/test/java/run/halo/app/utils/GitTest.java @@ -7,10 +7,7 @@ import org.eclipse.jgit.api.errors.GitAPIException; import org.eclipse.jgit.errors.RepositoryNotFoundException; import org.eclipse.jgit.transport.RemoteConfig; import org.eclipse.jgit.transport.URIish; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.*; import java.io.IOException; import java.net.URISyntaxException; @@ -28,15 +25,15 @@ import java.util.Set; @Slf4j public class GitTest { - private static Path tempPath; + private Path tempPath; - @BeforeClass - public static void setUp() throws IOException { + @Before + public void setUp() throws IOException { tempPath = Files.createTempDirectory("git-test"); } - @AfterClass - public static void destroy() throws IOException { + @After + public void destroy() throws IOException { FileUtils.deleteFolder(tempPath); }