File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/crypto Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1919
2020import org .apache .hadoop .conf .Configuration ;
2121import org .apache .hadoop .test .GenericTestUtils ;
22+ import org .assertj .core .api .Assertions ;
2223import org .bouncycastle .jce .provider .BouncyCastleProvider ;
2324import org .junit .Assert ;
2425import org .junit .Test ;
@@ -70,16 +71,18 @@ public void testAutoAddEnabled() {
7071 assertRemoveProvider ();
7172
7273 final Configuration conf = new Configuration ();
73- Assert .assertTrue ("true" .equalsIgnoreCase (
74- conf .get (HADOOP_SECURITY_CRYPTO_JCE_PROVIDER_AUTO_ADD_KEY )));
74+ Assertions .assertThat (conf .get (HADOOP_SECURITY_CRYPTO_JCE_PROVIDER_AUTO_ADD_KEY ))
75+ .describedAs ("conf: " + HADOOP_SECURITY_CRYPTO_JCE_PROVIDER_AUTO_ADD_KEY )
76+ .isEqualToIgnoringCase ("true" );
7577 Assert .assertTrue (HADOOP_SECURITY_CRYPTO_JCE_PROVIDER_AUTO_ADD_DEFAULT );
7678
7779 conf .set (HADOOP_SECURITY_CRYPTO_JCE_PROVIDER_KEY , CryptoUtils .BOUNCY_CASTLE_PROVIDER_NAME );
7880 final String providerFromConf = CryptoUtils .getJceProvider (conf );
7981 Assert .assertEquals (CryptoUtils .BOUNCY_CASTLE_PROVIDER_NAME , providerFromConf );
8082
8183 final Provider provider = Security .getProvider (BouncyCastleProvider .PROVIDER_NAME );
82- Assert .assertTrue (provider instanceof BouncyCastleProvider );
84+ Assertions .assertThat (provider )
85+ .isInstanceOf (BouncyCastleProvider .class );
8386
8487 assertRemoveProvider ();
8588 }
You can’t perform that action at this time.
0 commit comments