Skip to content

Flaky acceptance test cases in CI #12620

@xin-hedera

Description

@xin-hedera

Description

Acceptance tests have been flaky when running in CI. Example test failures:

Failures (1):
  JUnit Platform Suite:AcceptanceTest:Cucumber:Account Coverage Feature:Create crypto account when transferring to alias:Examples:Example #1.2
    ClasspathResourceSource [classpathResourceName = 'features/account/account.feature', filePosition = FilePosition [line = 30, column = 7]]
    => java.lang.AssertionError: 
Expected size: 2 but was: 3 in:
[class TransactionDetail {
    batchKey: null
    bytes: null
    chargedTxFee: 0
    consensusTimestamp: 1765765020.056056906
    entityId: null
    maxCustomFees: []
    maxFee: 0
    memoBase64: [B@5d1fb42b
    name: NODESTAKEUPDATE
    nftTransfers: []
    node: null
    nonce: 1
    parentConsensusTimestamp: null
    result: SUCCESS
    scheduled: false
    stakingRewardTransfers: []
    tokenTransfers: []
    transactionHash: [B@1fa8f053
    transactionId: 0.0.1003-1765765010-036000301
    transfers: []
    validDurationSeconds: null
    validStartTimestamp: 1765765010.036000301
    assessedCustomFees: []
},
    class TransactionDetail {
    batchKey: null
    bytes: null
    chargedTxFee: 39376619
    consensusTimestamp: 1765765020.056056907
    entityId: 0.0.1010
    maxCustomFees: []
    maxFee: 0
    memoBase64: [B@7d9b2eae
    name: CRYPTOCREATEACCOUNT
    nftTransfers: []
    node: null
    nonce: 2
    parentConsensusTimestamp: null
    result: SUCCESS
    scheduled: false
    stakingRewardTransfers: []
    tokenTransfers: []
    transactionHash: [B@f60e3ea
    transactionId: 0.0.1003-1765765010-036000301
    transfers: [class TransactionTransfersInner {
        account: 0.0.98
        amount: 31501297
        isApproval: false
    }, class TransactionTransfersInner {
        account: 0.0.800
        amount: 3937661
        isApproval: false
    }, class TransactionTransfersInner {
        account: 0.0.801
        amount: 3937661
        isApproval: false
    }, class TransactionTransfersInner {
        account: 0.0.1003
        amount: -39376619
        isApproval: false
    }]
    validDurationSeconds: null
    validStartTimestamp: 1765765010.036000301
    assessedCustomFees: []
},
    class TransactionDetail {
    batchKey: null
    bytes: null
    chargedTxFee: 85578
    consensusTimestamp: 1765765020.056056908
    entityId: null
    maxCustomFees: []
    maxFee: 5000000000
    memoBase64: [B@2ffea0c1
    name: CRYPTOTRANSFER
    nftTransfers: []
    node: 0.0.3
    nonce: 0
    parentConsensusTimestamp: null
    result: SUCCESS
    scheduled: false
    stakingRewardTransfers: []
    tokenTransfers: []
    transactionHash: [B@778cf705
    transactionId: 0.0.1003-1765765010-036000301
    transfers: [class TransactionTransfersInner {
        account: 0.0.3
        amount: 3477
        isApproval: false
    }, class TransactionTransfersInner {
        account: 0.0.98
        amount: 65681
        isApproval: false
    }, class TransactionTransfersInner {
        account: 0.0.800
        amount: 8210
        isApproval: false
    }, class TransactionTransfersInner {
        account: 0.0.801
        amount: 8210
        isApproval: false
    }, class TransactionTransfersInner {
        account: 0.0.1003
        amount: -85579
        isApproval: false
    }, class TransactionTransfersInner {
        account: 0.0.1010
        amount: 1
        isApproval: false
    }]
    validDurationSeconds: 120
    validStartTimestamp: 1765765010.036000301
    assessedCustomFees: []
}]
       org.hiero.mirror.test.e2e.acceptance.steps.AccountFeature.verifyAccountCreated(AccountFeature.java:120)
       ✽.the transfer auto creates a new account with balance of transferred amount 1 tℏ(classpath:features/account/account.feature:26)
2025-12-15T15:39:01.997Z ERROR ForkJoinPool-1-worker-5 o.h.m.t.e.a.s.FileFeature Scenario failure: 
I successfully create a file
the mirror node REST API should return status 200 for the file transaction
I successfully update the file
the mirror node REST API should return status 200 for the file transaction <- 
expected: "0.0.1054"
 but was: null
I successfully append to the file
the mirror node REST API should return status 200 for the file transaction
I successfully delete the file
the mirror node REST API should return status 200 for the file transaction
 org.opentest4j.AssertionFailedError: 
expected: "0.0.1054"
 but was: null
	at org.hiero.mirror.test.e2e.acceptance.steps.FileFeature.verifyMirrorTransactionsResponse(FileFeature.java:102)
	at org.hiero.mirror.test.e2e.acceptance.steps.FileFeature.verifyMirrorAPIResponses(FileFeature.java:80)
	at ✽.the mirror node REST API should return status 200 for the file transaction(classpath:features/file/file.feature:9)

Evidence suggests both failures are caused by very frequent synthetic NodeStakeUpdate transactions when solo sets consensus node staking period to 1 minute.

  • there is direct evidence in the first example since the actual transactions array has an additional unexpected NodeStakeUpdate transaction
  • in the second example, it's very likely that acceptance test retrieved a NodeStakeUpdate transaction instead of the expected FileUpdate transaction, thus the entity id check failed

The easy solution would be filtering NodeStakeUpdate transactions in MirrorNodeClient.getTransactions.

Steps to reproduce

check acceptance test workflow job runs

Additional context

No response

Hedera network

other

Version

v0.146.0-SNAPSHOT

Operating system

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugType: Something isn't workingtestTest infrastructure, automated tests required, etc

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions