Skip to content
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

Deprecate mock JNDI support in the spring-test module #22779

Closed
2 tasks done
sbrannen opened this issue Apr 10, 2019 · 0 comments
Closed
2 tasks done

Deprecate mock JNDI support in the spring-test module #22779

sbrannen opened this issue Apr 10, 2019 · 0 comments
Assignees
Labels
in: test Issues in the test module type: task A general task
Milestone

Comments

@sbrannen
Copy link
Member

sbrannen commented Apr 10, 2019

Overview

The mock JNDI support in the org.springframework.mock.jndi package is 15 years old, only partially implemented (see #22732), and typically not very useful for a modern Spring application where beans such as a DataSource should ideally be registered as stand-alone beans in the ApplicationContext and swapped out for integration tests (e.g., via bean definition profiles).

We should therefore deprecate this support and recommend that users use something better suited such as Simple-JNDI.

Related Issues

Deliverables

  • Deprecate all types in the org.springframework.mock.jndi package in spring-test.
  • Retain the repackaged copies in org.springframework.tests.mock.jndi in the src/test/java source tree of spring-context for internal testing purposes.
@sbrannen sbrannen self-assigned this Apr 10, 2019
@sbrannen sbrannen added in: test Issues in the test module type: task A general task labels Apr 10, 2019
@sbrannen sbrannen added this to the 5.2 M2 milestone Apr 10, 2019
@sbrannen sbrannen changed the title Deprecate mock JNDI support in org.springframework.mock.jndi Deprecate mock JNDI support in the spring-test module Apr 10, 2019
sbrannen added a commit to sbrannen/spring-framework that referenced this issue Apr 11, 2019
This commit removes the @deprecated declaration on the
org.springframework.mock.jndi package, since such usage results in a
compiler warning on JDK 9+ which breaks Spring's JDK 9 and JDK 11 CI
builds.

https://bugs.openjdk.java.net/browse/JDK-6481080

See spring-projectsgh-22779
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: test Issues in the test module type: task A general task
Projects
None yet
Development

No branches or pull requests

1 participant