-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
bugfix: fix DefaultCoordinatorTest failed in Windows OS #2237
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2237 +/- ##
=============================================
- Coverage 54.36% 53.77% -0.59%
- Complexity 2469 2620 +151
=============================================
Files 447 491 +44
Lines 14742 15389 +647
Branches 1734 1763 +29
=============================================
+ Hits 8015 8276 +261
- Misses 5966 6325 +359
- Partials 761 788 +27
|
server/src/test/java/io/seata/server/coordinator/DefaultCoordinatorTest.java
Show resolved
Hide resolved
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
Test fail on WinOS.
|
forgot to do npe check before destroySessionHolder, now added. |
deleteDataFile(); | ||
SessionHolder.init(StoreMode.FILE.name()); | ||
} | ||
|
||
private static void destroySessionHolder() { | ||
try { | ||
SessionHolder.getRootSessionManager(); |
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 should be SessionHolder.destroy
to determine whether or not null, SessionHolder as a static method class, there is no guarantee that the internal initialization.
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.
yeah,now add null check in SessionHolder.destroy()
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
Ⅰ. Describe what this PR did
fix DefaultCoordinatorTest failed in windows OS
Ⅱ. Does this pull request fix one issue?
fix #2235
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews