Skip to content

[Test] BaseTck hard-coded 25 ms timeout is flaky on slower machines #8378

Closed

Description

@jimi-21

Problem

BaseTck hard-codes the Reactive Streams TCK timeout to 25 ms, making several TCK tests timing-sensitive on slower or heavily loaded machines.

Constructor: https://github.com/ReactiveX/RxJava/blob/4.x/src/test/java/io/reactivex/rxjava4/tck/BaseTck.java#L37-L42

public BaseTck() {
    this(25L);
}

Evidence from local verification

Using Temurin and Zulu 26.0.2.1, Gradle 9.9.0, on Windows, full testNG runs produced varying failures such as:

  • FlowableVirtualTransformVirtual2TckTest.optional_spec104_mustSignalOnErrorWhenFails: publisher did not call onError within 25 ms.
  • FlowableVirtualTransformVirtual2TckTest.required_spec317_mustSupportACumulativePendingElementCountUpToLongMaxValue: did not receive expected element or completion within 25 ms.
  • FlowableVirtualTransformVirtual2TckTest.required_spec317_mustSupportAPendingElementCountUpToLongMaxValue: did not receive expected element or completion within 25 ms.
  • FlowableVirtualCreateVirtualTckTest.required_spec102_maySignalLessThanRequestedAndTerminateSubscription: did not receive expected element or completion within 25 ms.

Across different full runs, 8, 3, and 1 TCK tests failed. The affected TCK classes passed when rerun independently, indicating timing sensitivity rather than a stable functional regression.

The current 4.x file matches the unmodified original used for these runs.

Suggested direction

Please consider making the TCK timeout configurable (for example, through a system property or environment variable), so the default can remain 25 ms while local development and slower CI workers can use a more suitable value.

AI disclosure: Kimi Code assisted with reproducing and analyzing the timing failures and drafting this report. No production-code patch is attached.

Activity

  1. added this to the 4.0 milestone on Nov 16, 2026
  2. akarnokd commented on Nov 17, 2026

    @akarnokd
    Member

    There is the BaseTCK(long timeout) constructor, you can have those tests override the default with 50 and see if that helps locally.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions