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