directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject directory-kerby git commit: Fixed a test fail.
Date Mon, 23 Mar 2015 05:51:12 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/master 23c0a9dbb -> cfee779bd


Fixed a test fail.


Project: http://git-wip-us.apache.org/repos/asf/directory-kerby/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-kerby/commit/cfee779b
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/cfee779b
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/cfee779b

Branch: refs/heads/master
Commit: cfee779bd62ff63557190b3a6868afe4ddeb79d3
Parents: 23c0a9d
Author: hazel <linchen7@foxmail.com>
Authored: Mon Mar 23 13:51:04 2015 +0800
Committer: hazel <linchen7@foxmail.com>
Committed: Mon Mar 23 13:51:04 2015 +0800

----------------------------------------------------------------------
 .../apache/kerby/kerberos/kdc/JsonBackendKdcTest.java  | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/cfee779b/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/JsonBackendKdcTest.java
----------------------------------------------------------------------
diff --git a/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/JsonBackendKdcTest.java
b/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/JsonBackendKdcTest.java
index 8fbb593..e269b3e 100644
--- a/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/JsonBackendKdcTest.java
+++ b/kerby-kdc-test/src/test/java/org/apache/kerby/kerberos/kdc/JsonBackendKdcTest.java
@@ -23,19 +23,21 @@ import org.apache.kerby.config.Conf;
 import org.apache.kerby.config.Config;
 import org.apache.kerby.kerberos.kdc.identitybackend.JsonIdentityBackend;
 import org.apache.kerby.kerberos.kerb.identity.backend.IdentityBackend;
+import org.junit.AfterClass;
 import org.junit.Test;
 
 import java.io.File;
 
 public class JsonBackendKdcTest extends KdcTest {
+    private static File jsonBackendFile;
 
     @Override
     protected void setUpKdcServer() throws Exception {
         super.setUpKdcServer();
 
         File testDir = new File(System.getProperty("test.dir", "target"));
-        String jsonBackendFileString = new File(testDir,
-                "json-identity-backend-file").getAbsolutePath();
+        jsonBackendFile = new File(testDir, "json-backend-file");
+        String jsonBackendFileString = jsonBackendFile.getAbsolutePath();
 
         Config backendConfig = new Conf();
         backendConfig.setString(
@@ -52,4 +54,11 @@ public class JsonBackendKdcTest extends KdcTest {
         performKdcTest();
     }
 
+    @AfterClass
+    public static void rmJsonBackendFile() {
+        if (jsonBackendFile.exists()) {
+            jsonBackendFile.delete();
+        }
+    }
+
 }


Mime
View raw message