Skip to content

Global Contract Tests via Unit Tests #1962

Closed
@benjchristensen

Description

@benjchristensen

I'm wondering if there is a way for us to create an AbstractTest class that we could implement for each operator that would have a series of specification tests, similar to a TCK that assert core behavior as opposed to the operator functionality.

For example:

  • subscribe and unsubscribe
  • request(Long.MAX_VALUE)
  • request(0)
  • request(n < 0)
  • request(n > 0)
  • scalar
  • vector
  • infinite
  • async and sync variants of each
  • concurrency (where applicable, such as unsubscribe and request)

It would require the implementation classes providing an Observable impl with each operator configured correctly for the various cases, but then the abstract portions could do the pounding and prove the basics for all operators.

This would be a great addition for someone looking to contribute. If someone has the time to tackle this I'd be happy to review the approach, specifications and tests while getting started. We should prove it on a few operators first before making the effort for all of them. For example map, take, merge, groupBy.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions