mirror of
https://github.com/corda/corda.git
synced 2025-01-20 19:49:25 +00:00
Fixes bugs with contract constraints (#1696)
* Added schedulable flows to cordapp scanning Fixed a bug where the core flows are included in every cordapp. Added a test to prove the scheduled flows are loaded correctly. Added scheduled flow support to cordapp. Renabled broken test. Fixed test to prove cordapps aren't retreived from network. Review fixes. Fixed a test issue caused by gradle having slightly different paths to IntelliJ * Fixed test for real this time.
This commit is contained in:
parent
655f2be8b3
commit
2d53859745
@ -9,6 +9,7 @@ import net.corda.core.identity.Party
|
||||
* loaded or blocked.
|
||||
*/
|
||||
class IsolatedDummyFlow {
|
||||
@StartableByRPC
|
||||
@InitiatingFlow
|
||||
class Initiator(val toWhom: Party) : FlowLogic<Unit>() {
|
||||
@Suspendable
|
||||
|
@ -521,7 +521,7 @@ object LoggerSerializer : Serializer<Logger>() {
|
||||
object ClassSerializer : Serializer<Class<*>>() {
|
||||
override fun read(kryo: Kryo, input: Input, type: Class<Class<*>>): Class<*> {
|
||||
val className = input.readString()
|
||||
return Class.forName(className)
|
||||
return Class.forName(className, true, kryo.classLoader)
|
||||
}
|
||||
|
||||
override fun write(kryo: Kryo, output: Output, clazz: Class<*>) {
|
||||
|
Binary file not shown.
@ -55,6 +55,8 @@ class CordappLoaderTest {
|
||||
assertThat(actualCordapp.rpcFlows).isEmpty()
|
||||
assertThat(actualCordapp.schedulableFlows).isEmpty()
|
||||
assertThat(actualCordapp.services).isEmpty()
|
||||
assertThat(actualCordapp.serializationWhitelists).hasSize(1)
|
||||
assertThat(actualCordapp.serializationWhitelists.first().javaClass.name).isEqualTo("net.corda.finance.contracts.isolated.IsolatedPlugin")
|
||||
assertThat(actualCordapp.jarPath).isEqualTo(isolatedJAR)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user