ably-java
ably-java copied to clipboard
CryptoMessageTest failures
paddybyers thinks it may related to a known issue with OpenJDK: https://github.com/ably/ably-java/pull/388
However, if ./gradlew --version is telling me the truth then this may be unrelated or otherwise a regression...
ably-java % ./gradlew java:runUnitTests
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
> Configure project :android
OSSRH auth with username: quintinwillison
> Configure project :java
OSSRH auth with username: quintinwillison
> Task :java:compileBuildConfig
warning: [options] bootstrap class path not set in conjunction with -source 1.7
1 warning
> Task :java:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.7
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning
> Task :java:compileTestJava
warning: [options] bootstrap class path not set in conjunction with -source 1.7
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 warning
> Task :java:runUnitTests
-> Test rawViaMessagePack(io.ably.lib.types.MessageExtrasTest)
-> Test raw(io.ably.lib.types.MessageExtrasTest)
-> Test rawNullArgument(io.ably.lib.types.MessageExtrasTest)
-> Test encryptAndDecrypt(io.ably.lib.util.CryptoTest)
-> Test cipher_params(io.ably.lib.util.CryptoTest)
-> Test testEncrypt[AES128](io.ably.lib.util.CryptoMessageTest)
io.ably.lib.util.CryptoMessageTest > testEncrypt[AES128] FAILED
java.lang.AssertionError at CryptoMessageTest.java:128
-> Test testDecrypt[AES128](io.ably.lib.util.CryptoMessageTest)
io.ably.lib.util.CryptoMessageTest > testDecrypt[AES128] FAILED
io.ably.lib.types.MessageDecodeException at CryptoMessageTest.java:101
Caused by: java.lang.Exception at CryptoMessageTest.java:101
-> Test testEncrypt[AES256](io.ably.lib.util.CryptoMessageTest)
io.ably.lib.util.CryptoMessageTest > testEncrypt[AES256] FAILED
org.junit.internal.ArrayComparisonFailure at CryptoMessageTest.java:136
Caused by: java.lang.AssertionError at CryptoMessageTest.java:136
-> Test testDecrypt[AES256](io.ably.lib.util.CryptoMessageTest)
io.ably.lib.util.CryptoMessageTest > testDecrypt[AES256] FAILED
io.ably.lib.types.MessageDecodeException at CryptoMessageTest.java:101
Caused by: java.lang.Exception at CryptoMessageTest.java:101
9 tests completed, 4 failed
> Task :java:runUnitTests FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':java:runUnitTests'.
> There were failing tests. See the report at: file:///Users/quintin/code/ably-java/java/build/reports/tests/runUnitTests/index.html
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 14s
5 actionable tasks: 5 executed
?1 ably-java % ./gradlew --version
------------------------------------------------------------
Gradle 5.2.1
------------------------------------------------------------
Build time: 2019-02-08 19:00:10 UTC
Revision: f02764e074c32ee8851a4e1877dd1fea8ffb7183
Kotlin DSL: 1.1.3
Kotlin: 1.3.20
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.13 compiled on July 10 2018
JVM: 1.8.0_241 (Oracle Corporation 25.241-b07)
OS: Mac OS X 10.15.4 x86_64
Also with ./gradlew java:testRealtimeSuite locally I am seeing:
-> Test single_send_binary_text[text_protocol](io.ably.lib.test.realtime.RealtimeCryptoTest)
io.ably.lib.test.realtime.RealtimeSuite > io.ably.lib.test.realtime.RealtimeCryptoTest.single_send_binary_text[text_protocol] FAILED
java.lang.AssertionError at RealtimeCryptoTest.java:310
-> Test decodeAppleLibrarySequences[text_protocol](io.ably.lib.test.realtime.RealtimeCryptoTest)
io.ably.lib.test.realtime.RealtimeSuite > io.ably.lib.test.realtime.RealtimeCryptoTest.decodeAppleLibrarySequences[text_protocol] FAILED
io.ably.lib.types.AblyException at RealtimeCryptoTest.java:1061
Caused by: javax.crypto.BadPaddingException at RealtimeCryptoTest.java:1061
-> Test single_send_binary_text[binary_protocol](io.ably.lib.test.realtime.RealtimeCryptoTest)
io.ably.lib.test.realtime.RealtimeSuite > io.ably.lib.test.realtime.RealtimeCryptoTest.single_send_binary_text[binary_protocol] FAILED
java.lang.AssertionError at RealtimeCryptoTest.java:310
-> Test decodeAppleLibrarySequences[binary_protocol](io.ably.lib.test.realtime.RealtimeCryptoTest)
io.ably.lib.test.realtime.RealtimeSuite > io.ably.lib.test.realtime.RealtimeCryptoTest.decodeAppleLibrarySequences[binary_protocol] FAILED
io.ably.lib.types.AblyException at RealtimeCryptoTest.java:1061
Caused by: javax.crypto.BadPaddingException at RealtimeCryptoTest.java:1061