-
Notifications
You must be signed in to change notification settings - Fork 45
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
Support keyLock in LockGroup #38
Conversation
Codecov Report
@@ Coverage Diff @@
## master #38 +/- ##
============================================
+ Coverage 76.68% 78.04% +1.35%
- Complexity 556 571 +15
============================================
Files 54 54
Lines 1814 1817 +3
Branches 268 268
============================================
+ Hits 1391 1418 +27
+ Misses 306 281 -25
- Partials 117 118 +1
Continue to review full report at Codecov.
|
this.locksMap.putIfAbsent(lockName, new KeyLock()); | ||
} | ||
return (KeyLock) this.locksMap.get(lockName); | ||
} |
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.
add test
Change-Id: I9af3b76a264ddd061195997842e66a47df7c2fe9
Lock lock = this.group.lock("lock"); | ||
Assert.assertTrue(lock instanceof ReentrantLock); | ||
Lock lock1 = this.group.lock("lock"); | ||
Assert.assertTrue(lock == lock1); |
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.
assertSame
Change-Id: I43360da8b4c701bf02d635a7270af96a433ca5c7
Change-Id: I9af3b76a264ddd061195997842e66a47df7c2fe9