|
17 | 17 | */ |
18 | 18 | package org.apache.hadoop.security; |
19 | 19 |
|
| 20 | +import static org.apache.hadoop.fs.CommonConfigurationKeysPublic.HADOOP_RPC_PROTECTION; |
| 21 | +import static org.assertj.core.api.Assertions.assertThat; |
| 22 | + |
20 | 23 | import java.net.InetAddress; |
21 | 24 | import java.net.InetSocketAddress; |
22 | 25 | import java.util.Map; |
23 | 26 | import javax.security.sasl.Sasl; |
24 | | - |
25 | | -import org.junit.Before; |
26 | | -import org.junit.Test; |
27 | | - |
28 | 27 | import org.apache.hadoop.conf.Configuration; |
29 | 28 | import org.apache.hadoop.test.AbstractHadoopTestBase; |
30 | | - |
31 | | -import static org.apache.hadoop.fs.CommonConfigurationKeysPublic.HADOOP_RPC_PROTECTION; |
32 | | -import static org.junit.Assert.assertEquals; |
| 29 | +import org.junit.jupiter.api.BeforeEach; |
| 30 | +import org.junit.jupiter.api.Test; |
33 | 31 |
|
34 | 32 | public class TestSaslPropertiesResolver extends AbstractHadoopTestBase { |
35 | 33 |
|
36 | 34 | private static final InetAddress LOCALHOST = new InetSocketAddress("127.0.0.1", 1).getAddress(); |
37 | 35 |
|
38 | 36 | private SaslPropertiesResolver resolver; |
39 | 37 |
|
40 | | - @Before |
| 38 | + @BeforeEach |
41 | 39 | public void setup() { |
42 | 40 | Configuration conf = new Configuration(); |
43 | 41 | conf.set(HADOOP_RPC_PROTECTION, "privacy"); |
@@ -68,7 +66,7 @@ private static void setAuthenticationQop(Map<String, String> saslProperties) { |
68 | 66 | } |
69 | 67 |
|
70 | 68 | private static void assertPrivacyQop(Map<String, String> saslProperties) { |
71 | | - assertEquals(SaslRpcServer.QualityOfProtection.PRIVACY.getSaslQop(), |
| 69 | + assertThat(SaslRpcServer.QualityOfProtection.PRIVACY.getSaslQop()).isEqualTo( |
72 | 70 | saslProperties.get(Sasl.QOP)); |
73 | 71 | } |
74 | 72 |
|
|
0 commit comments