Skip to content

Enable Concurrent Test Execution with Reusable Client Management #3454

@mariodimitrovv

Description

@mariodimitrovv

Overview

Currently, the TCK tests run sequentially with each test creating and tearing down its own client environment. This approach is inefficient and prevents parallel test execution. This task implements concurrent test execution with proper client lifecycle management.

Current State

  • Tests use beforeEach to call setOperator() and afterEach to call JSONRPCRequest(this, "reset")
  • Each test suite sets up and tears down its environment independently
  • No support for concurrent test execution
  • TCK servers keep the client in state, so no concurrency is supported

Proposed Changes

1. Client Lifecycle Management

  • Replace beforeEach/afterEach with beforeAll/afterAll: Each transaction test suite creates its own client instance in beforeAll and properly closes it in afterAll
  • Client Reusability: Enable client reuse across multiple transaction types within the same test suite
  • Proper Resource Cleanup: Ensure clients are properly disposed to prevent resource leaks

2. Server-Side Client Management

  • Client Registry: Implement an in-memory data structure (Map) on the TCK server to track and manage multiple active clients
  • Session Management: Associate each client with a unique session ID for proper isolation
  • Concurrent Request Handling: Enable the server to handle multiple simultaneous requests from different test clients

3. Test Framework Updates

  • Parallel Test Execution: Configure test runner to support concurrent execution across different transaction service test suites
  • Isolation Guarantees: Ensure test isolation despite concurrent execution

Benefits

  • Significant reduction in test execution time through parallelization
  • Better resource utilization with shared client instances
  • Will enable the TCK to be run in the SDKs as standard CI check.

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

Status

👷 In Progress

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions