-
Notifications
You must be signed in to change notification settings - Fork 332
Remove CallContext.of() #1812
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
Remove CallContext.of() #1812
Conversation
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.
Do we want to go through a deprecation process for this even though it is a test only thing?
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.
I don't think we have to do that. We can follow the process after 1.0.
dimas-b
left a comment
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.
Changes LGTM overall, but I have a question about the rationale for some of them (as commented below)
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.
How is it related to the removal of CallContext.of()?
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 helps remove the CallContext.of() in BasePolarisMetaStoreManagerTest, where some tests have the following pattern
@Test
protected void testCreateEntitiesAlreadyExisting() {
PolarisMetaStoreManager metaStoreManager = polarisTestMetaStoreManager.polarisMetaStoreManager;
CallContext callCtx =
CallContext.of(() -> "testRealm", polarisTestMetaStoreManager.polarisCallContext);
if (CallContext.getCurrentContext() == null) {
CallContext.setCurrentContext(callCtx);
}
The polarisTestMetaStoreManager above is initialized in PolarisEclipseLinkMetaStoreManagerTest (and other persistence specific test class)
BTW, this change will disappear anyway with Yun's #1813 : )
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.
Yes, #1813 appears to introduce this change in a more logically consistent way. Let's merge it first :)
433255e to
7287d6a
Compare
This PR is a follow-up of #1806 to remove all usage of CallContext.of() in tests and the method itself