Skip to content

test(app): improve context cancellation handling in submission flow#223

Open
sachin9058 wants to merge 1 commit into
hyperledger:mainfrom
sachin9058:feat/context-cancellation-consistency
Open

test(app): improve context cancellation handling in submission flow#223
sachin9058 wants to merge 1 commit into
hyperledger:mainfrom
sachin9058:feat/context-cancellation-consistency

Conversation

@sachin9058

Copy link
Copy Markdown
Contributor

Type of change

  • Improvement (improvement to code, performance, etc)
  • Test update

Description

This PR improves consistency of context cancellation handling across transaction submission flows.

Changes include:

  • Added early context checks at the start of SubmitTransaction and SubmitTransactionWithWait

  • Ensured retry loop exits promptly when context is canceled

  • Added test coverage for:

    • cancellation before submission
    • cancellation before notification flow
    • cancellation during retry execution

These changes improve correctness and predictability without modifying existing behavior or APIs.

Additional details (Optional)

  • No changes to retry logic or public interfaces
  • All tests pass locally (go test ./...)
  • Linting and formatting checks pass (make lint)

Related issues

Closes #192

Signed-off-by: Sachin Kumar <sachinkumar905846@gmail.com>
@sachin9058

Copy link
Copy Markdown
Contributor Author

Hi @mbrandenburger,

I’ve opened this PR as a small follow-up improvement focused on context cancellation handling. It’s intentionally minimal and test-focused, without changing existing behavior.

Whenever you have time, I’d really appreciate your feedback. Happy to make any adjustments if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve context propagation consistency in transaction submission flow

1 participant