apache / apache/pinot

Provide testing help in pinot-java-client

Open
#6,779 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
6.1k
Forks
1.5k
Avg merge
1d 21h
Merged PRs (30d)
189

Description

Right now it is not easy to do the below simple testing steps:
1. Write some SQL, manually query into Pinot cluster
2. Record the response JSON into a resource file in Java
3. use that JSON as test fixtures to mock response

The major issue is that our [TestableResultTableResultSet.java](https://github.com/apache/incubator-pinot/blob/release-0.7.0/pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/ResultTableResultSet.java) file is not public.

So right now in our code we basically copy that file into our test project.
It is reasonable to avoid exposing as less as possible in public client, but on the other hand it also make sense to help client side testing easier.

Not sure how the best solution will be but we can think of a good way to avoid support but still provide testing support.
On top of my mind I am thinking of a new "pinot-java-client-test" module dedicated to test only.

Contributor guide

Open the contributing guide

Research direction

Start by reading pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/ResultTableResultSet.java and the surrounding Java client structure. Compare the current copied testing approach with the proposed pinot-java-client-test module, then define a testing API that supports recorded JSON fixtures without unnecessarily expanding the public client surface. Done means client-side tests can use response fixtures through supported test utilities.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.