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

Fail the build when Mongo not running and tests are active #4783

Open
marcingrzejszczak opened this issue Sep 12, 2024 · 1 comment
Open
Labels
type: task A general task

Comments

@marcingrzejszczak
Copy link
Contributor

Mongo is required to be running for Spring Data Mongo DB tests to pass. It would be beneficial to fail the build when skip tests is NOT turned on. In other words if someone is skipping the tests then we don't care if Mongo is running or not.

Additional note: Mongo must be running without a custom username and password, otherwise the tests will fail due to connection being unauthorized

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 12, 2024
@marcingrzejszczak marcingrzejszczak added this to the 4.2.10 (2023.1.10) milestone Sep 12, 2024
@marcingrzejszczak marcingrzejszczak added type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged labels Sep 12, 2024
@schauder schauder removed this from the 4.2.10 (2023.1.10) milestone Sep 13, 2024
@marcingrzejszczak
Copy link
Contributor Author

Current findings and trials

  • We created a JUnit extension that would fail when there's no Mongo. The problem with that was that the automatically registered extension would be registered AFTER the Spring one which means that the context would fail to start after 30-40 seconds and only after that would the extension be called what of course beats the purpose of failing fast
  • There was reluctance from the team to add solutions that would be called during the build (wget to access Mongo, Groovy script, static void main in Java) because they wouldn't fail when running tests in the IDE

We've decided to close the PR for now and come back to this in the future

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

3 participants