ENT-11113 Ignored JDK 17 related fixes for byteman related issues (#7626)

* Updated mockito version and removed ignored annotation to relevant test cases
This commit is contained in:
Balwant Kothari 2023-12-21 16:41:55 +05:30 committed by GitHub
parent e815b381ef
commit d235e887fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 9 additions and 19 deletions

View File

@ -246,9 +246,9 @@ dependencies {
// Byteman for runtime (termination) rules injection on the running node
// Submission tool allowing to install rules on running nodes
slowIntegrationTestCompile "org.jboss.byteman:byteman-submit:4.0.11"
slowIntegrationTestCompile "org.jboss.byteman:byteman-submit:4.0.22"
// The actual Byteman agent which should only be in the classpath of the out of process nodes
slowIntegrationTestCompile "org.jboss.byteman:byteman:4.0.11"
slowIntegrationTestCompile "org.jboss.byteman:byteman:4.0.22"
testImplementation(project(':test-cli'))
testImplementation(project(':test-utils'))

View File

@ -21,7 +21,6 @@ import net.corda.testing.flows.waitForAllFlowsToComplete
import net.corda.testing.node.NotarySpec
import net.corda.testing.node.internal.FINANCE_CORDAPPS
import net.corda.testing.node.internal.enclosedCordapp
import org.junit.Ignore
import org.junit.Test
import kotlin.test.assertEquals
import kotlin.test.fail
@ -33,7 +32,6 @@ class FinalityFlowErrorHandlingTest : StateMachineErrorHandlingTest() {
*
*/
@Test(timeout = 300_000)
@Ignore("TODO JDK17: Fixme")
fun `error after recording an issuance transaction inside of FinalityFlow generates recovery metadata`() {
startDriver(notarySpec = NotarySpec(DUMMY_NOTARY_NAME, validating = false),
extraCordappPackagesToScan = listOf("net.corda.node.flows", "net.corda.finance.test.flows")) {

View File

@ -22,7 +22,6 @@ import kotlin.test.assertEquals
import kotlin.test.assertFailsWith
@Suppress("MaxLineLength") // Byteman rules cannot be easily wrapped
@Ignore("TODO JDK17: Fixme")
class StateMachineFinalityErrorHandlingTest : StateMachineErrorHandlingTest() {
/**
@ -33,7 +32,13 @@ class StateMachineFinalityErrorHandlingTest : StateMachineErrorHandlingTest() {
*
* Only the responding node keeps a checkpoint. The initiating flow has completed successfully as it has complete its
* send to the responding node and the responding node successfully received it.
*
* Note : This test case is failing because of byteman instrumentation issue where byteman is not able to instrument method
* with default method implementation in interface ServiceHubInternal its probably
* because of changes in bytecode of kotlin 1.2 to 1.9
*
*/
@Ignore("JDK 17 Failure because of byteman instrumentation issue")
@Test(timeout = 300_000)
fun `error recording a transaction inside of ReceiveFinalityFlow will keep the flow in for observation`() {
startDriver(notarySpec = NotarySpec(DUMMY_NOTARY_NAME, validating = false)) {
@ -95,6 +100,7 @@ class StateMachineFinalityErrorHandlingTest : StateMachineErrorHandlingTest() {
* Only the responding node keeps a checkpoint. The initiating flow has completed successfully as it has complete its
* send to the responding node and the responding node successfully received it.
*/
@Ignore("JDK 17 Failure because of byteman instrumentation issue")
@Test(timeout = 300_000)
fun `error resolving a transaction's dependencies inside of ReceiveFinalityFlow will keep the flow in for observation`() {
startDriver(notarySpec = NotarySpec(DUMMY_NOTARY_NAME, validating = false)) {

View File

@ -12,7 +12,6 @@ import net.corda.testing.core.ALICE_NAME
import net.corda.testing.core.CHARLIE_NAME
import net.corda.testing.core.singleIdentity
import net.corda.testing.driver.internal.OutOfProcessImpl
import org.junit.Ignore
import org.junit.Test
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors
@ -22,7 +21,6 @@ import kotlin.test.assertFailsWith
import kotlin.test.assertTrue
@Suppress("MaxLineLength") // Byteman rules cannot be easily wrapped
@Ignore("TODO JDK17: Fixme")
class StateMachineFlowInitErrorHandlingTest : StateMachineErrorHandlingTest() {
private companion object {

View File

@ -16,7 +16,6 @@ import net.corda.testing.core.ALICE_NAME
import net.corda.testing.core.CHARLIE_NAME
import net.corda.testing.core.singleIdentity
import org.assertj.core.api.Assertions.assertThatExceptionOfType
import org.junit.Ignore
import org.junit.Test
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors
@ -25,7 +24,6 @@ import kotlin.test.assertEquals
import kotlin.test.assertFailsWith
@Suppress("MaxLineLength") // Byteman rules cannot be easily wrapped
@Ignore("TODO JDK17: Fixme")
class StateMachineGeneralErrorHandlingTest : StateMachineErrorHandlingTest() {
private companion object {

View File

@ -13,7 +13,6 @@ import net.corda.core.utilities.seconds
import net.corda.testing.core.ALICE_NAME
import net.corda.testing.core.CHARLIE_NAME
import net.corda.testing.core.singleIdentity
import org.junit.Ignore
import org.junit.Test
import java.time.Duration
import java.time.temporal.ChronoUnit
@ -23,7 +22,6 @@ import kotlin.test.assertFailsWith
import kotlin.test.assertTrue
@Suppress("MaxLineLength") // Byteman rules cannot be easily wrapped
@Ignore("TODO JDK17: Fixme")
class StateMachineKillFlowErrorHandlingTest : StateMachineErrorHandlingTest() {
/**

View File

@ -15,12 +15,10 @@ import net.corda.node.services.statemachine.transitions.TopLevelTransition
import net.corda.testing.core.ALICE_NAME
import net.corda.testing.core.CHARLIE_NAME
import net.corda.testing.core.singleIdentity
import org.junit.Ignore
import org.junit.Test
import kotlin.test.assertEquals
@Suppress("MaxLineLength") // Byteman rules cannot be easily wrapped
@Ignore("TODO JDK17: Fixme")
class StateMachineSubFlowErrorHandlingTest : StateMachineErrorHandlingTest() {
/**

View File

@ -28,7 +28,6 @@ import org.assertj.core.api.Assertions.assertThatExceptionOfType
import org.junit.After
import org.junit.Assert
import org.junit.Before
import org.junit.Ignore
import org.junit.Test
import rx.Observable
import java.sql.SQLTransientConnectionException
@ -46,7 +45,6 @@ import kotlin.test.assertFalse
import kotlin.test.assertNull
import kotlin.test.assertTrue
@Ignore("TODO JDK17: Fixme")
class FlowClientIdTests {
private lateinit var mockNet: InternalMockNetwork

View File

@ -76,7 +76,6 @@ import org.junit.Assert.assertNotEquals
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertNull
import org.junit.Before
import org.junit.Ignore
import org.junit.Test
import rx.Notification
import rx.Observable
@ -93,7 +92,6 @@ import kotlin.reflect.KClass
import kotlin.test.assertFailsWith
import kotlin.test.assertTrue
@Ignore("TODO JDK17: Fixme")
class FlowFrameworkTests {
companion object {
init {

View File

@ -16,12 +16,10 @@ import org.assertj.core.api.Assertions.assertThat
import org.assertj.core.api.AssertionsForClassTypes
import org.junit.After
import org.junit.Before
import org.junit.Ignore
import org.junit.Test
import rx.Observable
import java.util.*
@Ignore("TODO JDK17: Fixme")
class FlowFrameworkTripartyTests {
companion object {
init {