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

227 adopt refactoring of testclasswithdatabases from model tests #232

Merged

Conversation

vteague
Copy link
Member

@vteague vteague commented Dec 24, 2024

This combines the refactoring done by DD to get TestClassWithDatabases to use test.properties with the refactoring done by @umbernhard to bring a lot of the repeated functions into the base class.

Copy link
Collaborator

@umbernhard umbernhard left a comment

Choose a reason for hiding this comment

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

This looks great!

Properties hibernateProperties = new Properties();
hibernateProperties.setProperty("hibernate.driver", "org.postgresql.Driver");
hibernateProperties.setProperty("hibernate.url", postgres.getJdbcUrl());
hibernateProperties.setProperty("hibernate.user", postgres.getUsername());
Copy link
Collaborator

Choose a reason for hiding this comment

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

it's so much nicer that this is loaded from a config dynamically instead of my hardcoded version!

import us.freeandfair.corla.math.Audit;
import us.freeandfair.corla.model.CVRContestInfo;
import us.freeandfair.corla.model.CastVoteRecord;
import us.freeandfair.corla.model.CastVoteRecord.RecordType;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm guessing the changes in this file are just because you're now loading the data via an SQL file instead of manually adding it?

@vteague vteague merged commit 76cf74f into main Jan 9, 2025
1 check passed
@vteague vteague deleted the 227-adopt-refactoring-of-testclasswithdatabases-from-model-tests branch January 9, 2025 10:44
michelleblom added a commit that referenced this pull request Jan 10, 2025
…s part of PR #231. These changes had been clobbered by a later PR (#232). This should have been caught in review but was not.
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.

Adopt refactoring of TestClassWithDatabases from model-tests
2 participants