You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by en...@apache.org on 2014/03/06 20:13:32 UTC
svn commit: r1575016 - in /hbase/branches/0.98: ./
hbase-common/src/test/java/org/apache/hadoop/hbase/io/crypto/TestKeyStoreKeyProvider.java
Author: enis
Date: Thu Mar 6 19:13:32 2014
New Revision: 1575016
URL: http://svn.apache.org/r1575016
Log:
HBASE-10685 [WINDOWS] TestKeyStoreKeyProvider fails on windows
Modified:
hbase/branches/0.98/ (props changed)
hbase/branches/0.98/hbase-common/src/test/java/org/apache/hadoop/hbase/io/crypto/TestKeyStoreKeyProvider.java
Propchange: hbase/branches/0.98/
------------------------------------------------------------------------------
Merged /hbase/trunk:r1575014
Modified: hbase/branches/0.98/hbase-common/src/test/java/org/apache/hadoop/hbase/io/crypto/TestKeyStoreKeyProvider.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-common/src/test/java/org/apache/hadoop/hbase/io/crypto/TestKeyStoreKeyProvider.java?rev=1575016&r1=1575015&r2=1575016&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-common/src/test/java/org/apache/hadoop/hbase/io/crypto/TestKeyStoreKeyProvider.java (original)
+++ hbase/branches/0.98/hbase-common/src/test/java/org/apache/hadoop/hbase/io/crypto/TestKeyStoreKeyProvider.java Thu Mar 6 19:13:32 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);