-
Notifications
You must be signed in to change notification settings - Fork 0
Fix DB already exists #8
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e567f9f
update: add HomeListMenu for improved home management and integrate m…
AxenoDev 81c1c9e
update: enhance database connection handling and remove SQLite config…
AxenoDev 3fa60ae
Revert "update: add HomeListMenu for improved home management and int…
AxenoDev 9fbd0fc
update: improve database connection error handling and validate confi…
AxenoDev 3da35bc
update: add MySQL configuration and refactor database connection init…
AxenoDev 8cd3830
update: change SQLite database initialization to use in-memory databa…
AxenoDev 1275eac
update: change SQLite database initialization to use in-memory databa…
AxenoDev 6ea5817
update: remove H2 database dependency from test implementation
AxenoDev 8ac6d7e
update: enhance MySQL database initialization with driver loading and…
AxenoDev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🧩 Analysis chain
🏁 Script executed:
Repository: AxenoDev/Hommr
Length of output: 116
🏁 Script executed:
Repository: AxenoDev/Hommr
Length of output: 70
🏁 Script executed:
# Look at the test file to understand the changes cat -n src/test/java/me/axeno/hommr/managers/DatabaseManagerTest.javaRepository: AxenoDev/Hommr
Length of output: 5782
🏁 Script executed:
Repository: AxenoDev/Hommr
Length of output: 3918
🏁 Script executed:
# Check Java version in build.gradle cat build.gradleRepository: AxenoDev/Hommr
Length of output: 5748
Replace in-memory SQLite with a file-based database to avoid flaky tests with connection pooling.
JdbcPooledConnectionSourcecreates multiple pooled connections, and SQLite's::memory:URI creates a new isolated in-memory database per connection. Saves and queries can hit different databases, causing test failures. Use the available@TempDirto create a file-based test database instead.Suggested fix
void setUp() throws SQLException { // Use SQLite in-memory database for testing databaseManager = new DatabaseManager(); - databaseManager.init("jdbc:sqlite::memory:", "", ""); + Path dbFile = tempDir.resolve("test.db"); + databaseManager.init("jdbc:sqlite:" + dbFile.toString(), "", "");🤖 Prompt for AI Agents