-
Notifications
You must be signed in to change notification settings - Fork 3
Fix AlgorithmDAOTest failure by adding database patch and test data initialization #308
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
Conversation
Co-authored-by: rvosa <106490+rvosa@users.noreply.github.com>
|
@copilot we're still getting this: |
Co-authored-by: rvosa <106490+rvosa@users.noreply.github.com>
... The issue was that Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot add a patch called patches/0006_add-algorithm-types.sql that is imported by treebase-core/db/schema/init_db_uptodate.pg in the same way as the other imports such that the six algorithm types are created as an integral part of the postgres initialization routine rather than by setting them up for individual tests. |
Co-authored-by: rvosa <106490+rvosa@users.noreply.github.com>
Co-authored-by: rvosa <106490+rvosa@users.noreply.github.com>
Created patch |
|
@copilot new problem: |
Co-authored-by: rvosa <106490+rvosa@users.noreply.github.com>
... The duplicate key error was caused by the test's |
Fix AlgorithmDAOTest Failure
Root Cause
The test
testFinalAllUniqueAlgorithmDescriptionswas failing with "empty descriptions" because the algorithm table had no data during test execution.Solution
Created database patch
0006_add-algorithm-types.sqlthat:init_db_uptodate.pgas part of the PostgreSQL initialization routineAlgorithm types added:
Changes Made
initTreebase.sql(for manual DB setup)0006_add-algorithm-types.sqlfor PostgreSQL initializationinit_db_uptodate.pgto include patches 0006 and 00070006_create-indices.sqlto0007_create-indices.sqlonSetUpBeforeTransaction()method from test (was causing duplicate key errors)Security Summary
No security vulnerabilities detected. All CodeQL checks passed.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.