Skip to content

Fix member repo tests - #102

Open
Arshadul-Monir wants to merge 6 commits into
mainfrom
fix-member-repo-tests
Open

Arshadul-Monir wants to merge 6 commits into
mainfrom
fix-member-repo-tests

Conversation

@Arshadul-Monir

Copy link
Copy Markdown
Member

SQL files are better tested via integration testing. MemberSqlRepoTest is now being tested via SpringBootTest rather than being a unit test.

@Arshadul-Monir
Arshadul-Monir requested a review from a team September 7, 2026 18:13

Optional<Member> getMemberByEmail(String email);

boolean deleteMemberById(UUID id);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

again, we shouldn't be introducing methods that are solely used in tests (unless i missed something where it was used elsewhere)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It was added so that, to delete the testing user, you don't have to re-import JdbcClient into the test file to call the deletion function

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Understood that it's easier, but we should still never be doing this. It's confusing and miscommunicates the purpose of the class signature.

We shouldn't even really be persisting state like the user across multiple tests. It should be instantiated with separate state for each test.

The latter is not really a big issue though. You can automatically have the users deleted after each test by annotating the class with a @transactional annotation. This rolls back all of the transactions in the test after it's done

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@spiffyy99

Copy link
Copy Markdown

backend tests and sonarcloud failing

@graphite-app

graphite-app Bot commented Sep 12, 2026

Copy link
Copy Markdown

Graphite Automations

"Request reviewers once CI passes" took an action on this PR • (09/12/26)

1 reviewer was added to this PR based on Henry Chen's automation.

@Arshadul-Monir
Arshadul-Monir force-pushed the fix-member-repo-tests branch 3 times, most recently from 15173cf to b6bc9d0 Compare September 14, 2026 19:28
@sonarqubecloud

Copy link
Copy Markdown

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.

3 participants