Fixed master. (#4375)

This commit is contained in:
Michele Sollecito 2018-12-06 11:59:25 +00:00 committed by GitHub
parent b641a08a7f
commit 7b65ab3410
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,6 +14,7 @@ import net.corda.core.node.services.AttachmentStorage
import net.corda.core.serialization.internal.CheckpointSerializationContext import net.corda.core.serialization.internal.CheckpointSerializationContext
import net.corda.core.serialization.ClassWhitelist import net.corda.core.serialization.ClassWhitelist
import net.corda.core.serialization.CordaSerializable import net.corda.core.serialization.CordaSerializable
import net.corda.core.serialization.MissingAttachmentsException
import net.corda.core.serialization.internal.AttachmentsClassLoader import net.corda.core.serialization.internal.AttachmentsClassLoader
import net.corda.node.serialization.kryo.CordaClassResolver import net.corda.node.serialization.kryo.CordaClassResolver
import net.corda.node.serialization.kryo.CordaKryo import net.corda.node.serialization.kryo.CordaKryo
@ -215,8 +216,8 @@ class CordaClassResolverTests {
CordaClassResolver(emptyWhitelistContext).getRegistration(attachedClass) CordaClassResolver(emptyWhitelistContext).getRegistration(attachedClass)
} }
@Test(expected = IllegalArgumentException::class) @Test(expected = MissingAttachmentsException::class)
fun `Attempt to load contract attachment with the incorrect uploader should fails with IAE`() { fun `Attempt to load contract attachment with the incorrect uploader should fails with MissingAttachmentsException`() {
val storage = MockAttachmentStorage() val storage = MockAttachmentStorage()
val attachmentHash = importJar(storage, "some_uploader") val attachmentHash = importJar(storage, "some_uploader")
val classLoader = AttachmentsClassLoader(arrayOf(attachmentHash).map { storage.openAttachment(it)!! }) val classLoader = AttachmentsClassLoader(arrayOf(attachmentHash).map { storage.openAttachment(it)!! })