Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-12016

Improve test suite: performance, warnings, and async/sync isolation

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started

      Overview

      Improve the Apisonator test suite to address performance issues, eliminate warnings, and properly separate async and sync test execution.

      Problems to Address

      1. Test Performance

      Some integration tests are slow in both sync and async modes. This impacts developer productivity and CI/CD pipeline efficiency.

      Goals:

      • Profile and identify slowest integration tests
      • Optimize slow tests where possible
      • Consider parallelization strategies
      • Target significant reduction in overall test suite execution time

      2. Puma Warning in Sync Mode

      When running tests in sync mode, the following warning appears:

      Warning: You specified code to run in a `before_fork` block, but Puma is not configured to run in cluster mode (worker count > 0), so your `before_fork` block did not run
      

      Goals:

      • Fix or suppress this warning appropriately
      • Ensure Puma configuration is correct for test environments
      • Document expected behavior

      3. Async/Sync Test Suite Isolation

      Currently, the sync test suite loads async components and vice versa. This cross-contamination:

      • Causes confusing failures when bugs exist in either mode
      • Makes debugging difficult (e.g., sync tests blocked by async redis client bugs)
      • Wastes developer time troubleshooting unrelated issues
      • Violates separation of concerns

      Goals:

      • Completely separate async and sync test suites
      • Ensure sync tests only load sync components
      • Ensure async tests only load async components
      • Add safeguards to prevent future cross-contamination
      • Update test helpers and configuration accordingly

      Background Context

      Recent work on async-redis 0.13 upgrade revealed these issues. A bug in the async redis client blocked sync tests because sync tests were inadvertently loading async components. This caused significant confusion and wasted debugging time.

      Success Criteria

      • Integration tests run noticeably faster (target: 20-30% improvement)
      • Puma warning eliminated or properly documented as expected
      • Sync tests run without loading any async components
      • Async tests run without loading any sync components
      • Test isolation verified with specific checks
      • CI/CD pipeline reflects improvements

              Unassigned Unassigned
              rh-ee-jlledo Joan Lledo
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: