Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make integration tests using test suites #11634

Closed
wants to merge 2 commits into from

Conversation

xiangfu0
Copy link
Contributor

Split integration tests into two suites: integration-suite-1 and integration-suite-2

@xiangfu0 xiangfu0 force-pushed the integration-tests-suite branch 3 times, most recently from c0b4919 to 477bff9 Compare September 20, 2023 19:04
@codecov-commenter
Copy link

codecov-commenter commented Sep 20, 2023

Codecov Report

Merging #11634 (ffc08cd) into master (bfa03fe) will decrease coverage by 0.17%.
The diff coverage is 5.12%.

@@             Coverage Diff              @@
##             master   #11634      +/-   ##
============================================
- Coverage     63.12%   62.96%   -0.17%     
  Complexity     1140     1140              
============================================
  Files          2343     2343              
  Lines        126306   126330      +24     
  Branches      19419    19421       +2     
============================================
- Hits          79733    79545     -188     
- Misses        40905    41108     +203     
- Partials       5668     5677       +9     
Flag Coverage Δ
integration ?
integration1 ?
integration2 ?
java-11 14.40% <2.56%> (-48.68%) ⬇️
java-17 62.94% <5.12%> (-0.03%) ⬇️
java-20 62.95% <5.12%> (-0.05%) ⬇️
temurin 62.96% <5.12%> (-0.17%) ⬇️
unittests 62.96% <5.12%> (-0.16%) ⬇️
unittests1 67.07% <16.66%> (-0.21%) ⬇️
unittests2 14.40% <2.56%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...a/org/apache/pinot/core/transport/QueryServer.java 61.76% <100.00%> (+0.57%) ⬆️
.../java/org/apache/pinot/common/utils/ZkStarter.java 0.00% <0.00%> (ø)
...pinot/server/realtime/ControllerLeaderLocator.java 80.39% <0.00%> (-3.29%) ⬇️
...inot/controller/helix/ControllerRequestClient.java 37.34% <16.66%> (ø)
...tream/kafka20/server/KafkaDataServerStartable.java 0.00% <0.00%> (ø)
...eam/kinesis/server/KinesisDataServerStartable.java 0.00% <0.00%> (ø)

... and 25 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@xiangfu0 xiangfu0 force-pushed the integration-tests-suite branch 2 times, most recently from 1b29f55 to 82382e8 Compare September 21, 2023 18:59
Copy link
Contributor

@walterddr walterddr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we planning to reuse cluster for some of the SQL tests or just to use this framework to better balance the 2 integration test sides in GHA?

@xiangfu0 xiangfu0 force-pushed the integration-tests-suite branch 3 times, most recently from 371d0e6 to 8d4161c Compare September 21, 2023 19:32
@xiangfu0
Copy link
Contributor Author

are we planning to reuse cluster for some of the SQL tests or just to use this framework to better balance the 2 integration test sides in GHA?

Integration 1 and 2 are for balancing.
The custom tests is a suite to reuse the test.

@xiangfu0 xiangfu0 force-pushed the integration-tests-suite branch 5 times, most recently from 58c0042 to 4c77a6d Compare September 21, 2023 20:31
@@ -39,7 +39,7 @@
/**
* Integration test for floating point data type (float & double) filter queries.
*/
@Test(suiteName = "CustomClusterIntegrationTest")
@Test(suiteName = "CustomClusterIntegrationTest", groups = {"custom-integration-suite"})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so before this change the @BeforeSuite and @BeforeClass is basically the same b/c they are not group into suite is that correct? (we should see huge test time reduction if so)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only this package has the suite implementation, which is already tested using mvn test -P github-actions,custom-cluster-integration-test-suite || exit 1. But in this case, we are missing the code coverage report for this.
So just wanna merge these two suite to run together.

@xiangfu0
Copy link
Contributor Author

We have 3 integration tests profile right now:

  1. integration-tests-1
  2. integration-tests-2
  3. custom-integration-tests

1 and 2 are just for rebalancing
3 is a suite to bring up cluster once

Right now we split the integration tests in two parts:
For 1, we run two commands:

mvn test -P github-actions,custom-cluster-integration-test-suite
mvn test -P github-actions,integration-test-suite-1

For 2, just one command:

mvn test -P github-actions,integration-test-suite-2

The issue with 1 is that we are missing the code coverage report for the first command.
Hence we need to model everything into test suites then we can combine and run two suites together.

</run>
</groups>
<packages>
<package name="org.apache.pinot.integration.tests.*"/>
Copy link
Contributor

@walterddr walterddr Sep 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks like in includes everything (*) and the other *-2 also have the same package name, do we plan to still do the first letter split to make it eaiser (e.g. no need to annotate each test class).

b/c i can image adding a new file without remembering to include the suite name - one will be able to manually trigger that test in IDE but will be ignored in CI and mvn test

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm i actually see you do exclusion from the *-2 xml... (maybe to call it out in comment)

</run>
</groups>
<packages>
<package name="org.apache.pinot.integration.tests.*"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm i actually see you do exclusion from the *-2 xml... (maybe to call it out in comment)

Comment on lines +26 to +27
<exclude name="custom-integration-suite"/>
<exclude name="integration-suite-1"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good to call out that integration-suite-2 is a catch all and theoretically it doesn't need name annotation in @Test

@walterddr
Copy link
Contributor

lgtm can you fix the test failures

@xiangfu0 xiangfu0 force-pushed the integration-tests-suite branch 6 times, most recently from 2d82e5b to 53cf473 Compare October 5, 2023 00:15
@xiangfu0 xiangfu0 force-pushed the integration-tests-suite branch 21 times, most recently from afd762b to 6272c77 Compare October 11, 2023 23:11
@xiangfu0 xiangfu0 force-pushed the integration-tests-suite branch 4 times, most recently from 5bfefc7 to a325a48 Compare October 12, 2023 22:56
@xiangfu0 xiangfu0 closed this Oct 25, 2023
@xiangfu0 xiangfu0 deleted the integration-tests-suite branch October 25, 2023 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants