Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15172#discussion_r85850906
  
    --- Diff: 
common/network-common/src/test/java/org/apache/spark/network/sasl/SparkSaslSuite.java
 ---
    @@ -374,6 +375,69 @@ public void testDelegates() throws Exception {
         }
       }
     
    +  @Test
    +  public void testSaslEncryptionAes() throws Exception {
    +    final AtomicReference<ManagedBuffer> response = new 
AtomicReference<>();
    +    final File file = File.createTempFile("sasltest", ".txt");
    +    SaslTestCtx ctx = null;
    +    try {
    +      final TransportConf conf = new TransportConf("rpc", new 
SystemPropertyConfigProvider());
    +      final TransportConf spyConf = spy(conf);
    +      doReturn(true).when(spyConf).AesEncryptionEnabled();
    +
    +      StreamManager sm = mock(StreamManager.class);
    +      when(sm.getChunk(anyLong(), anyInt())).thenAnswer(new 
Answer<ManagedBuffer>() {
    +        @Override
    +        public ManagedBuffer answer(InvocationOnMock invocation) {
    +          return new FileSegmentManagedBuffer(spyConf, file, 0, 
file.length());
    +        }
    +      });
    +
    +      RpcHandler rpcHandler = mock(RpcHandler.class);
    +      when(rpcHandler.getStreamManager()).thenReturn(sm);
    +
    +      byte[] data = new byte[ 256 * 1024 * 1024];
    --- End diff --
    
    nit: no space after `[`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to