-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
fix #195 add context unit test #488
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #488 +/- ##
============================================
+ Coverage 28.01% 28.32% +0.3%
- Complexity 646 659 +13
============================================
Files 193 193
Lines 7456 7456
Branches 910 910
============================================
+ Hits 2089 2112 +23
+ Misses 5149 5123 -26
- Partials 218 221 +3
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.
assertj?
|
||
@Test | ||
public void testAssertNotInGlobalTransaction() { | ||
RootContext.assertNotInGlobalTransaction(); |
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.
expected?
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.
this case without exception,the next one with exception
public void testAssertNotInGlobalTransactionWithException() { | ||
RootContext.assertNotInGlobalTransaction(); | ||
RootContext.bind(DEFAULT_XID); | ||
RootContext.assertNotInGlobalTransaction(); |
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.
when the UT have finished or all UT for this class have finished, should clear RootContext。It may affect other UTs
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.
ok ,get it
Ⅰ. Describe what this PR did
add unit test
Ⅱ. Does this pull request fix one issue?
fix #195
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews