Skip to content

Testcontainers#224

Open
hannosgit wants to merge 15 commits intodbos-inc:mainfrom
hannosgit:testcontainers
Open

Testcontainers#224
hannosgit wants to merge 15 commits intodbos-inc:mainfrom
hannosgit:testcontainers

Conversation

@hannosgit
Copy link
Contributor

Add testcontainers as test dependency for the setup of a Postgresql instance for testing. This allows running the tests on a local machine. The only requirement is Docker.
This PR also moves the setup of the DB connection into a common base class.

@devhawk
Copy link
Collaborator

devhawk commented Nov 19, 2025

FYI, I'm OOF at PASS this week and for Thanksgiving next week. This looks cool, but not sure when I'll have a chance to review.

@devhawk
Copy link
Collaborator

devhawk commented Dec 1, 2025

FYI, this looks good but I haven't made it work w/ my local environment (I'm running docker inside of WSL). Working on fixing this on my end - I can't merge approve this until I can confirm it works for me locally.

@devhawk
Copy link
Collaborator

devhawk commented Dec 1, 2025

Also note, the cli tests were not updated to use testcontainers. I will look at that after I update my environment to work w/ testcontainers.

testImplementation("io.rest-assured:rest-assured:5.4.0")
testImplementation("io.rest-assured:json-path:5.4.0")
testImplementation("io.rest-assured:xml-path:5.4.0")
testImplementation("org.testcontainers:postgresql:1.21.3")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per https://java.testcontainers.org/modules/databases/postgres/, this appears to be an outdated version

Resolved all merge conflicts by keeping testcontainers setup:
- All tests now extend DbSetupTestBase and use testcontainers
- Updated build.gradle.kts to include both testcontainers and maven-artifact dependencies
- Added dataSource field to DbSetupTestBase for tests that need direct database access
- Converted 6 new test files to use DbSetupTestBase:
  * MetricsTest
  * SingleExecutionTest
  * PatchTest
  * PartitionedQueuesTest
  * ForkTest
  * GarbageCollectionTest
@devhawk
Copy link
Collaborator

devhawk commented Jan 12, 2026

FYI, I'm working on some db connection changes. Might make sense to give your updates a day or two

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants