hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject svn commit: r1575014 - /hbase/trunk/hbase-common/src/test/java/org/apache/hadoop/hbase/io/crypto/TestKeyStoreKeyProvider.java
Date Thu, 06 Mar 2014 19:12:04 GMT
Author: enis
Date: Thu Mar  6 19:12:04 2014
New Revision: 1575014

URL: http://svn.apache.org/r1575014
Log:
HBASE-10685 [WINDOWS] TestKeyStoreKeyProvider fails on windows

Modified:
    hbase/trunk/hbase-common/src/test/java/org/apache/hadoop/hbase/io/crypto/TestKeyStoreKeyProvider.java

Modified: hbase/trunk/hbase-common/src/test/java/org/apache/hadoop/hbase/io/crypto/TestKeyStoreKeyProvider.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-common/src/test/java/org/apache/hadoop/hbase/io/crypto/TestKeyStoreKeyProvider.java?rev=1575014&r1=1575013&r2=1575014&view=diff
==============================================================================
--- hbase/trunk/hbase-common/src/test/java/org/apache/hadoop/hbase/io/crypto/TestKeyStoreKeyProvider.java
(original)
+++ hbase/trunk/hbase-common/src/test/java/org/apache/hadoop/hbase/io/crypto/TestKeyStoreKeyProvider.java
Thu Mar  6 19:12:04 2014
@@ -16,7 +16,8 @@
  */
 package org.apache.hadoop.hbase.io.crypto;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 
 import java.io.File;
 import java.io.FileOutputStream;
@@ -32,7 +33,6 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.hbase.HBaseCommonTestingUtility;
 import org.apache.hadoop.hbase.SmallTests;
-
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -84,7 +84,7 @@ public class TestKeyStoreKeyProvider {
   @Test(timeout=30000)
   public void testKeyStoreKeyProviderWithPassword() throws Exception {
     KeyProvider provider = new KeyStoreKeyProvider();
-    provider.init("jceks://" + storeFile.getAbsolutePath() + "?password=" + PASSWORD);
+    provider.init("jceks://" + storeFile.toURI().getPath() + "?password=" + PASSWORD);
     Key key = provider.getKey(ALIAS);
     assertNotNull(key);
     byte[] keyBytes = key.getEncoded();
@@ -97,7 +97,7 @@ public class TestKeyStoreKeyProvider {
   @Test(timeout=30000)
   public void testKeyStoreKeyProviderWithPasswordFile() throws Exception {
     KeyProvider provider = new KeyStoreKeyProvider();
-    provider.init("jceks://" + storeFile.getAbsolutePath() + "?passwordFile=" +
+    provider.init("jceks://" + storeFile.toURI().getPath() + "?passwordFile=" +
       URLEncoder.encode(passwordFile.getAbsolutePath(), "UTF-8"));
     Key key = provider.getKey(ALIAS);
     assertNotNull(key);



Mime
View raw message