fix ByteStringSpec for Scala 2.13, #26956

* simply ignore that compat test for 2.13 because the only reason for
  testing Java serialization compat is that in Akka 2.4 it used
  Java serialization (and in 2.5 when additional-serialization-bindings
  was disabled)
This commit is contained in:
Patrik Nordwall 2019-05-20 12:03:13 +02:00
parent a9f4f2dd96
commit 3e32cdc3ca
2 changed files with 13 additions and 11 deletions

View file

@ -894,17 +894,17 @@ class ByteStringSpec extends WordSpec with Matchers with Checkers {
}
"serialize correctly" when {
"parsing regular ByteString1C as compat" in {
val oldSerd =
if (util.Properties.versionNumberString.startsWith("2.12"))
// note that this is serialization with Java serialization
// real serialization is in akka-remote
if (util.Properties.versionNumberString.startsWith("2.12")) {
"parsing regular ByteString1C as compat" in {
val oldSerd =
"aced000573720021616b6b612e7574696c2e42797465537472696e672442797465537472696e67314336e9eed0afcfe4a40200015b000562797465737400025b427872001b616b6b612e7574696c2e436f6d7061637442797465537472696e67fa2925150f93468f0200007870757200025b42acf317f8060854e002000078700000000a74657374737472696e67"
else
// The data is the same, but the class hierarchy changed in 2.13:
"aced000573720021616b6b612e7574696c2e42797465537472696e672442797465537472696e67314336e9eed0afcfe4a40200015b000562797465737400025b427872001b616b6b612e7574696c2e436f6d7061637442797465537472696e676c083a30328adea002000078720014616b6b612e7574696c2e42797465537472696e67e54813305c6d95cc0200007870757200025b42acf317f8060854e002000078700000000a74657374737472696e67"
val bs = ByteString("teststring", "UTF8")
val str = hexFromSer(bs)
val bs = ByteString("teststring", "UTF8")
val str = hexFromSer(bs)
str should be(oldSerd)
str should be(oldSerd)
}
}
"given all types of ByteString" in {