Skip to content

Rename WebDriverContextCustomizerFactory's customizer #36416

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

Closed
sbrannen opened this issue Jul 15, 2023 · 7 comments
Closed

Rename WebDriverContextCustomizerFactory's customizer #36416

sbrannen opened this issue Jul 15, 2023 · 7 comments
Assignees
Labels
type: task A general task
Milestone

Comments

@sbrannen
Copy link
Member

sbrannen commented Jul 15, 2023

Due to changes in Spring Framework 6.0 (see spring-projects/spring-framework#29229), ContextCustomizer implementations are logged at DEBUG level using only their simple name.

Consequently, we see log statements such as the following.

DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Using ContextCustomizers for test class [MySpringTests]: [ExcludeFilterContextCustomizer, DuplicateJsonObjectContextCustomizer, MockitoContextCustomizer, TestRestTemplateContextCustomizer, WebTestClientContextCustomizer, DisableObservabilityContextCustomizer, PropertyMappingContextCustomizer, Customizer]

The last Customizer entry is for org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory.Customizer.

To improve diagnostics, I suggest that the Customizer class be renamed to WebDriverScopeContextCustomizer or WebDriverContextCustomizer.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 15, 2023
@wilkinsona wilkinsona added type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 17, 2023
@wilkinsona wilkinsona added this to the 3.0.x milestone Jul 17, 2023
@CodeWithSouma
Copy link

Could you please tell me which file name I have to rename and if provide the file path it will be helpful for me to fix this issue.

@quaff
Copy link
Contributor

quaff commented Jul 18, 2023

Could you please tell me which file name I have to rename and if provide the file path it will be helpful for me to fix this issue.

You should try to find it by yourself, it's a basic prerequisite if you want to contribute, otherwise please don't make noise.

@CodeWithSouma
Copy link

I want to resolve this issue

@wilkinsona
Copy link
Member

@quaff your comment is unnecessary. If we felt that it was necessary, @scottfrederick would have replied differently to the original question from @CodeWithSouma.

@philwebb
Copy link
Member

@sbrannen I'm happy to rename this class since it's internal, but I wonder if the logging in Framework should be done at ClassUtils.getShortName instead of Class.getSimpleName? I think that would result in WebDriverContextCustomizerFactory.Customizer in the logs.

@philwebb philwebb added status: on-hold We can't start working on this issue yet status: waiting-for-internal-feedback An issue that needs input from a member or another Spring Team labels Jul 18, 2023
@sbrannen
Copy link
Member Author

I'm happy to rename this class since it's internal,

Thanks. I made sure it was internal before asking the team to rename it. 😉

but I wonder if the logging in Framework should be done at ClassUtils.getShortName instead of Class.getSimpleName? I think that would result in WebDriverContextCustomizerFactory.Customizer in the logs.

I'd prefer not to switch to ClassUtils.getShortName. One of the primary goals of spring-projects/spring-framework#29229 was to reduce DEBUG logging to a minimum (at least, as much as possible).

If we made that switch, many of the other "simple names" would end up considerably longer -- for example, DuplicateJsonObjectContextCustomizer would become DuplicateJsonObjectContextCustomizerFactory.DuplicateJsonObjectContextCustomizer, etc.

@philwebb philwebb removed status: on-hold We can't start working on this issue yet status: waiting-for-internal-feedback An issue that needs input from a member or another Spring Team labels Jul 19, 2023
@snicoll snicoll self-assigned this Aug 7, 2023
@snicoll snicoll modified the milestones: 3.0.x, 3.0.10 Aug 7, 2023
@snicoll snicoll closed this as completed in 56535d8 Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

No branches or pull requests

8 participants