Skip to content

Integration test exceptions fix#11396

Merged
Jackie-Jiang merged 2 commits intoapache:masterfrom
abhioncbr:intgeration-test-exception-fix
Aug 22, 2023
Merged

Integration test exceptions fix#11396
Jackie-Jiang merged 2 commits intoapache:masterfrom
abhioncbr:intgeration-test-exception-fix

Conversation

@abhioncbr
Copy link
Contributor

@abhioncbr abhioncbr commented Aug 20, 2023

  • fixing the getCurrentCountStarResult to avoid the IndexOutOfBoundsException. Here is the stack trace
        20:27:01.720 WARN [CustomDataQueryClusterIntegrationTest] [main] Setting up integration test class: ThetaSketchTest
        20:27:01.991 WARN [TestUtils] [main] Error while waiting for condition
        java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
            at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) ~[?:?]
            at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) ~[?:?]
            at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248) ~[?:?]
            at java.util.Objects.checkIndex(Objects.java:372) ~[?:?]
            at java.util.ArrayList.get(ArrayList.java:459) ~[?:?]
            at org.apache.pinot.client.ResultSetGroup.getResultSet(ResultSetGroup.java:90) ~[pinot-java-client-0.13.0-SNAPSHOT.jar:0.13.0-SNAPSHOT-8563d33e1a88d5a3baf22fc8faa1f107685ea904]
            at org.apache.pinot.integration.tests.BaseClusterIntegrationTest.getCurrentCountStarResult(BaseClusterIntegrationTest.java:719) ~[pinot-integration-test-base-0.13.0-SNAPSHOT-tests.jar:0.13.0-SNAPSHOT-8563d33e1a88d5a3baf22fc8faa1f107685ea904]
            at org.apache.pinot.integration.tests.BaseClusterIntegrationTest.lambda$waitForDocsLoaded$0(BaseClusterIntegrationTest.java:735) ~[pinot-integration-test-base-0.13.0-SNAPSHOT-tests.jar:0.13.0-SNAPSHOT-8563d33e1a88d5a3baf22fc8faa1f107685ea904]
            at org.apache.pinot.util.TestUtils.waitForCondition(TestUtils.java:130) [pinot-common-0.13.0-SNAPSHOT-tests.jar:0.13.0-SNAPSHOT-8563d33e1a88d5a3baf22fc8faa1f107685ea904]
            at org.apache.pinot.integration.tests.BaseClusterIntegrationTest.waitForDocsLoaded(BaseClusterIntegrationTest.java:735) [pinot-integration-test-base-0.13.0-SNAPSHOT-tests.jar:0.13.0-SNAPSHOT-8563d33e1a88d5a3baf22fc8faa1f107685ea904]
            at org.apache.pinot.integration.tests.BaseClusterIntegrationTest.waitForAllDocsLoaded(BaseClusterIntegrationTest.java:730) [pinot-integration-test-base-0.13.0-SNAPSHOT-tests.jar:0.13.0-SNAPSHOT-8563d33e1a88d5a3baf22fc8faa1f107685ea904]
            at org.apache.pinot.integration.tests.custom.CustomDataQueryClusterIntegrationTest.setUp(CustomDataQueryClusterIntegrationTest.java:90) [test-classes/:?]
            at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
            at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
            at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
            at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
            at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108) [testng-6.11.jar:?]
            at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:523) [testng-6.11.jar:?]
            at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:224) [testng-6.11.jar:?]
            at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:146) [testng-6.11.jar:?]
            at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:166) [testng-6.11.jar:?]
            at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:105) [testng-6.11.jar:?]
            at org.testng.TestRunner.privateRun(TestRunner.java:744) [testng-6.11.jar:?]
            at org.testng.TestRunner.run(TestRunner.java:602) [testng-6.11.jar:?]
            at org.testng.SuiteRunner.runTest(SuiteRunner.java:380) [testng-6.11.jar:?]
            at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:375) [testng-6.11.jar:?]
            at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340) [testng-6.11.jar:?]
            at org.testng.SuiteRunner.run(SuiteRunner.java:289) [testng-6.11.jar:?]
            at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) [testng-6.11.jar:?]
            at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) [testng-6.11.jar:?]
            at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301) [testng-6.11.jar:?]
            at org.testng.TestNG.runSuitesLocally(TestNG.java:1226) [testng-6.11.jar:?]
            at org.testng.TestNG.runSuites(TestNG.java:1144) [testng-6.11.jar:?]
            at org.testng.TestNG.run(TestNG.java:1115) [testng-6.11.jar:?]
            at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:284) [surefire-testng-3.0.0-M5.jar:3.0.0-M5]
            at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75) [surefire-testng-3.0.0-M5.jar:3.0.0-M5]
            at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:119) [surefire-testng-3.0.0-M5.jar:3.0.0-M5]
            at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:428) [surefire-booter-3.0.0-M5.jar:3.0.0-M5]
            at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162) [surefire-booter-3.0.0-M5.jar:3.0.0-M5]
            at org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:562) [surefire-booter-3.0.0-M5.jar:3.0.0-M5]
            at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:548) [surefire-booter-3.0.0-M5.jar:3.0.0-M5]
        20:27:02.112 WARN [CustomDataQueryClusterIntegrationTest] [main] Finished setting up integration test class: ThetaSketchTest```

@codecov-commenter
Copy link

codecov-commenter commented Aug 21, 2023

Codecov Report

Merging #11396 (e0e0f11) into master (6c89906) will increase coverage by 1.35%.
Report is 5 commits behind head on master.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master   #11396      +/-   ##
============================================
+ Coverage     61.44%   62.80%   +1.35%     
+ Complexity     6515     1079    -5436     
============================================
  Files          2234     2300      +66     
  Lines        120175   123622    +3447     
  Branches      18240    18796     +556     
============================================
+ Hits          73842    77641    +3799     
+ Misses        40910    40453     -457     
- Partials       5423     5528     +105     
Flag Coverage Δ
integration <0.01% <ø> (?)
integration1 <0.01% <ø> (+<0.01%) ⬆️
integration2 0.00% <ø> (ø)
java-11 62.77% <ø> (-0.30%) ⬇️
java-17 14.51% <ø> (-46.80%) ⬇️
java-20 62.67% <ø> (+1.39%) ⬆️
temurin 62.80% <ø> (+1.35%) ⬆️
unittests 62.80% <ø> (?)
unittests1 67.28% <ø> (+0.30%) ⬆️
unittests2 14.52% <ø> (-0.05%) ⬇️

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

see 315 files with indirect coverage changes

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

@Jackie-Jiang
Copy link
Contributor

The context is gone. Do you still have the stack trace for the exception? It might be a real bug instead of testing issue

@abhioncbr
Copy link
Contributor Author

abhioncbr commented Aug 21, 2023

The context is gone. Do you still have the stack trace for the exception? It might be a real bug instead of testing issue

yes, updated. It's currently available in any Integration Test Set 1

Copy link
Contributor

@Jackie-Jiang Jackie-Jiang left a comment

Choose a reason for hiding this comment

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

Good catch!


protected long getCurrentCountStarResult(String tableName) {
return getPinotConnection().execute("SELECT COUNT(*) FROM " + tableName).getResultSet(0).getLong(0);
ResultSetGroup resultSetGroup = getPinotConnection().execute("SELECT COUNT(*) FROM " + tableName);
Copy link
Contributor

Choose a reason for hiding this comment

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

(nit) wrong indentation

@Jackie-Jiang Jackie-Jiang added the flaky-test Tracks a test that intermittently fails label Aug 21, 2023
@abhioncbr abhioncbr marked this pull request as ready for review August 21, 2023 23:53
@abhioncbr abhioncbr changed the title [WIP]: Integration test exceptions fix Integration test exceptions fix Aug 21, 2023
@Jackie-Jiang Jackie-Jiang merged commit 3974b16 into apache:master Aug 22, 2023
@abhioncbr abhioncbr deleted the intgeration-test-exception-fix branch April 25, 2024 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flaky-test Tracks a test that intermittently fails

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants