mirror of
https://github.com/corda/corda.git
synced 2025-06-18 07:08:15 +00:00
Several tests were corrupting Kryo which was then returned to the common pool. (#378)
* We were leaving trailing attachmentStorage on pooled kryo instances after some tests. Changed attachment storage logic to make it impossible to leave it behind. * Some low level tests corrupt the Kryo config, so do not return to pool when this is the case. Also, we discovered that Kryo is caching class name to class resolution. We don't want to do this where attachments are involved. The errors raised highlighted a class missing from the whitelist. Need to write a unit test to test the class loader issue. * Unit test for attachment class loading with kryo.
This commit is contained in:
@ -6,6 +6,7 @@ import net.corda.core.node.CordaPluginRegistry
|
||||
import net.corda.core.serialization.SerializationCustomization
|
||||
import org.apache.activemq.artemis.api.core.SimpleString
|
||||
import rx.Notification
|
||||
import rx.exceptions.OnErrorNotImplementedException
|
||||
import java.math.BigDecimal
|
||||
import java.time.LocalDate
|
||||
import java.time.Period
|
||||
@ -49,6 +50,7 @@ class DefaultWhitelist : CordaPluginRegistry() {
|
||||
addToWhitelist(LocalDate::class.java)
|
||||
addToWhitelist(Period::class.java)
|
||||
addToWhitelist(BitSet::class.java)
|
||||
addToWhitelist(OnErrorNotImplementedException::class.java)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
Reference in New Issue
Block a user