-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
add unit test for ServerChannels #12616
Conversation
fb3d19d
to
4e7e4f4
Compare
4e7e4f4
to
9f34a6a
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
ready for review |
There was a problem hiding this 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() |
There was a problem hiding this comment.
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()
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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()
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
No description provided.