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

add unit test for ServerChannels #12616

Merged
merged 2 commits into from
Mar 12, 2024

Conversation

sullis
Copy link
Contributor

@sullis sullis commented Mar 10, 2024

No description provided.

@sullis sullis force-pushed the sean/ServerChannelsTest-add branch 2 times, most recently from fb3d19d to 4e7e4f4 Compare March 10, 2024 19:42
@sullis sullis force-pushed the sean/ServerChannelsTest-add branch from 4e7e4f4 to 9f34a6a Compare March 10, 2024 19:47
@codecov-commenter
Copy link

codecov-commenter commented Mar 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.80%. Comparing base (59551e4) to head (9f34a6a).
Report is 103 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #12616      +/-   ##
============================================
+ Coverage     61.75%   61.80%   +0.05%     
+ Complexity      207      198       -9     
============================================
  Files          2436     2452      +16     
  Lines        133233   133791     +558     
  Branches      20636    20749     +113     
============================================
+ Hits          82274    82691     +417     
- Misses        44911    44988      +77     
- Partials       6048     6112      +64     
Flag Coverage Δ
custom-integration1 <0.01% <ø> (-0.01%) ⬇️
integration <0.01% <ø> (-0.01%) ⬇️
integration1 <0.01% <ø> (-0.01%) ⬇️
integration2 0.00% <ø> (ø)
java-11 61.74% <ø> (+0.03%) ⬆️
java-21 61.68% <ø> (+0.06%) ⬆️
skip-bytebuffers-false 61.79% <ø> (+0.04%) ⬆️
skip-bytebuffers-true 61.66% <ø> (+33.93%) ⬆️
temurin 61.80% <ø> (+0.05%) ⬆️
unittests 61.80% <ø> (+0.05%) ⬆️
unittests1 46.91% <ø> (+0.02%) ⬆️
unittests2 27.71% <ø> (-0.02%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sullis
Copy link
Contributor Author

sullis commented Mar 11, 2024

ready for review

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.

LGTM with minor comments

}

@BeforeClass
public void beforeClass()
Copy link
Contributor

Choose a reason for hiding this comment

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

(convention) We usually name it setUp()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

}

@AfterClass
public void afterClass()
Copy link
Contributor

Choose a reason for hiding this comment

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

(convention) We usually name it tearDown()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

}

@Test(dataProvider = "parameters")
public void testConnect(final boolean nativeTransportEnabled)
Copy link
Contributor

Choose a reason for hiding this comment

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

(convention) We don't usually put final for local variables

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

throws Exception {
PinotMetricUtils.init(new PinotConfiguration());
PinotMetricsRegistry registry = PinotMetricUtils.getPinotMetricsRegistry();
BrokerMetrics brokerMetrics = new BrokerMetrics(registry);
Copy link
Contributor

Choose a reason for hiding this comment

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

We can mock the BrokerMetrics

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@Jackie-Jiang Jackie-Jiang merged commit a3ee0a3 into apache:master Mar 12, 2024
19 checks passed
@sullis sullis deleted the sean/ServerChannelsTest-add branch March 12, 2024 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants