-
Notifications
You must be signed in to change notification settings - Fork 275
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
Upgrade gradle, fix test logging and int test CPU usage #1235
Conversation
We can close #1031 once current PR is merged. |
Codecov Report
@@ Coverage Diff @@
## master #1235 +/- ##
============================================
+ Coverage 83.62% 88.63% +5.01%
- Complexity 57 61 +4
============================================
Files 6 6
Lines 348 352 +4
Branches 38 37 -1
============================================
+ Hits 291 312 +21
+ Misses 45 29 -16
+ Partials 12 11 -1
Continue to review full report at Codecov.
|
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.
Looks good. Minor and optional comments (can be addressed in future PR)
ambry-network/src/main/java/com.github.ambry.network/BlockingChannelInfo.java
Outdated
Show resolved
Hide resolved
ambry-network/src/main/java/com.github.ambry.network/BlockingChannelInfo.java
Outdated
Show resolved
Hide resolved
@@ -793,9 +796,6 @@ private void getEntriesSinceTest(NavigableMap<MockId, NavigableSet<IndexValue>> | |||
highestIdIncluded = referenceIndex.lastKey().equals(idToCheck) ? null : referenceIndex.lastKey(); | |||
// check the case where maxSize is more than the number of entries in the segment | |||
doGetEntriesSinceTest(referenceIndex, segment, idToCheck, maxSize + 1, 0, highestIdIncluded); |
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.
One thing we can improve in the future is doGetEntriesSinceTest
is invoked multiple times and some are in the loop. I find that doGetEntriesSinceTest
test both getEntriesSince()
and getIndexEntriesSince()
methods. Note that getIndexEntriesSince()
with oneEntryPerKey = true
is actually tested in getEntriesSince()
. It seems we don't have to explicitly test oneEntryPerKey = true
for getIndexEntriesSince()
again. (My two cents.)
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.
For now I will leave the test since whether or not it is called is dependent on the implementation of getEntriesSince
and getIndexEntriesSince
is still exposed to the package. I'll think about how to further reduce the test length in future PRs.
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
- Upgrade to gradle 5.2.1. As part of this, I have separated the integration tests into their own task so that they can be run independently. The "allTest" target will do what the "test" target used to do. - Suppress some especially noisy logs in integration tests. These log messages were firing continuously when the node-down scenarios were tested. - Configure MockCluster replication threads to do a 100 ms sleep per iteration. This greatly reduces the CPU requirements for running the integration tests and allows us to run them on travis-ci. - Set up travis to run integration tests too.
cbac5c4
to
6c99703
Compare
integration tests into their own task so that they can be run
independently. The "allTest" target will do what the "test" target
used to do.
messages were firing continuously when the node-down scenarios were
tested.
iteration. This greatly reduces the CPU requirements for running the
integration tests and allows us to run them on travis-ci.