diff --git a/core/src/test/scala/org/apache/spark/security/CryptoStreamUtilsSuite.scala b/core/src/test/scala/org/apache/spark/security/CryptoStreamUtilsSuite.scala index 27a53e8205201..e3171116a3e14 100644 --- a/core/src/test/scala/org/apache/spark/security/CryptoStreamUtilsSuite.scala +++ b/core/src/test/scala/org/apache/spark/security/CryptoStreamUtilsSuite.scala @@ -112,7 +112,7 @@ class CryptoStreamUtilsSuite extends SparkFunSuite { bytes.toByteArray() }.collect()(0) - assert(content != encrypted) + assert(!content.getBytes(UTF_8).sameElements(encrypted)) val in = CryptoStreamUtils.createCryptoInputStream(new ByteArrayInputStream(encrypted), sc.conf, SparkEnv.get.securityManager.getIOEncryptionKey().get)