mirror of
https://github.com/corda/corda.git
synced 2024-12-19 04:57:58 +00:00
Merge pull request #7621 from corda/feature/arshad/ent-11294-fix-checkpoint-failing-test
ENT-11294 Fix failing tests in - FlowCheckpointVersionNodeStartupCheckTest
This commit is contained in:
commit
7cbfc71a74
@ -30,7 +30,6 @@ import net.corda.testing.driver.driver
|
||||
import net.corda.testing.node.internal.assertUncompletedCheckpoints
|
||||
import net.corda.testing.node.internal.enclosedCordapp
|
||||
import org.assertj.core.api.Assertions.assertThat
|
||||
import org.junit.Ignore
|
||||
import org.junit.Test
|
||||
import java.nio.file.Path
|
||||
import kotlin.io.path.createDirectories
|
||||
@ -40,7 +39,6 @@ import kotlin.io.path.readText
|
||||
import kotlin.test.assertFailsWith
|
||||
|
||||
// TraderDemoTest already has a test which checks the node can resume a flow from a checkpoint
|
||||
@Ignore("TODO JDK17: Fixme")
|
||||
class FlowCheckpointVersionNodeStartupCheckTest {
|
||||
companion object {
|
||||
val defaultCordapp = enclosedCordapp()
|
||||
|
@ -9,11 +9,9 @@ import net.corda.core.utilities.getOrThrow
|
||||
import net.corda.testing.driver.driver
|
||||
import net.corda.testing.driver.logFile
|
||||
import org.assertj.core.api.Assertions
|
||||
import org.junit.Ignore
|
||||
import org.junit.Test
|
||||
import java.time.Duration
|
||||
|
||||
@Ignore("TODO JDK17: Fixme")
|
||||
class DuplicateSerializerLogTest{
|
||||
@Test(timeout=300_000)
|
||||
fun `check duplicate serialisers are logged`() {
|
||||
|
@ -12,11 +12,9 @@ import net.corda.testing.driver.driver
|
||||
import net.corda.testing.driver.logFile
|
||||
import net.corda.testing.node.internal.enclosedCordapp
|
||||
import org.assertj.core.api.Assertions
|
||||
import org.junit.Ignore
|
||||
import org.junit.Test
|
||||
import java.time.Duration
|
||||
|
||||
@Ignore("TODO JDK17: Fixme")
|
||||
class DuplicateSerializerLogWithSameSerializerTest {
|
||||
@Test(timeout=300_000)
|
||||
fun `check duplicate serialisers are logged not logged for the same class`() {
|
||||
|
@ -1,5 +1,6 @@
|
||||
package net.corda.node.internal
|
||||
|
||||
import com.esotericsoftware.kryo.KryoException
|
||||
import net.corda.core.cordapp.Cordapp
|
||||
import net.corda.core.crypto.SecureHash
|
||||
import net.corda.core.flows.FlowLogic
|
||||
@ -42,13 +43,14 @@ object CheckpointVerifier {
|
||||
it.forEach { (_, serializedCheckpoint) ->
|
||||
val checkpoint = try {
|
||||
serializedCheckpoint.deserialize(checkpointSerializationContext)
|
||||
} catch (e: ClassNotFoundException) {
|
||||
val message = e.message
|
||||
} catch (e: KryoException) {
|
||||
if (e.cause is ClassNotFoundException) {
|
||||
val message = (e.cause as ClassNotFoundException).message
|
||||
if (message != null) {
|
||||
throw CheckpointIncompatibleException.CordappNotInstalledException(message)
|
||||
} else {
|
||||
throw CheckpointIncompatibleException.CannotBeDeserialisedException(e)
|
||||
}
|
||||
}
|
||||
throw CheckpointIncompatibleException.CannotBeDeserialisedException(e)
|
||||
} catch (e: Exception) {
|
||||
throw CheckpointIncompatibleException.CannotBeDeserialisedException(e)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user