directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From plusplusjia...@apache.org
Subject directory-kerby git commit: Remove the jsonBackendFile after test in JsonBackendTest.
Date Wed, 24 Jun 2015 03:18:53 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/master 5761e9fa6 -> 6f15357c3


Remove the jsonBackendFile after test in JsonBackendTest.


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

Branch: refs/heads/master
Commit: 6f15357c3250d5dfd5a53954a9401cc826974821
Parents: 5761e9f
Author: plusplusjiajia <jiajia.li@intel.com>
Authored: Wed Jun 24 11:24:09 2015 +0800
Committer: plusplusjiajia <jiajia.li@intel.com>
Committed: Wed Jun 24 11:24:09 2015 +0800

----------------------------------------------------------------------
 .../kerberos/kerb/identity/backend/JsonBackendTest.java  | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/6f15357c/kerby-backend/json-backend/src/test/java/org/apache/kerby/kerberos/kerb/identity/backend/JsonBackendTest.java
----------------------------------------------------------------------
diff --git a/kerby-backend/json-backend/src/test/java/org/apache/kerby/kerberos/kerb/identity/backend/JsonBackendTest.java
b/kerby-backend/json-backend/src/test/java/org/apache/kerby/kerberos/kerb/identity/backend/JsonBackendTest.java
index 9894e10..777d8bc 100644
--- a/kerby-backend/json-backend/src/test/java/org/apache/kerby/kerberos/kerb/identity/backend/JsonBackendTest.java
+++ b/kerby-backend/json-backend/src/test/java/org/apache/kerby/kerberos/kerb/identity/backend/JsonBackendTest.java
@@ -22,6 +22,7 @@ package org.apache.kerby.kerberos.kerb.identity.backend;
 import org.apache.kerby.config.Conf;
 import org.apache.kerby.config.Config;
 import org.apache.kerby.kerberos.kdc.identitybackend.JsonIdentityBackend;
+import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -32,11 +33,13 @@ import java.io.File;
  */
 public class JsonBackendTest extends BackendTest {
     private static IdentityBackend backend;
+    private static File jsonBackendFile;
 
     @BeforeClass
     public static void setup() {
         File testDir = new File(System.getProperty("test.dir", "target"));
-        String jsonBackendFileString = new File(testDir, "json-identity-backend-file").getAbsolutePath();
+        jsonBackendFile = new File(testDir, "json-identity-backend-file");
+        String jsonBackendFileString = jsonBackendFile.getAbsolutePath();
 
         Config backendConfig = new Conf();
         backendConfig.setString(JsonIdentityBackend.JSON_IDENTITY_BACKEND_FILE, jsonBackendFileString);
@@ -70,4 +73,10 @@ public class JsonBackendTest extends BackendTest {
         super.testGetIdentities(backend);
     }
 
+    @AfterClass
+    public static void rmJsonBackendFile() {
+        if (jsonBackendFile.exists()) {
+            jsonBackendFile.delete();
+        }
+    }
 }


Mime
View raw message