Skip to content

MINOR: Use testFixturesImplementation instead of testFixturesApi#22243

Merged
chia7712 merged 4 commits into
apache:trunkfrom
m1a2st:MINOR-use-testFixturesImplementation
May 10, 2026
Merged

MINOR: Use testFixturesImplementation instead of testFixturesApi#22243
chia7712 merged 4 commits into
apache:trunkfrom
m1a2st:MINOR-use-testFixturesImplementation

Conversation

@m1a2st
Copy link
Copy Markdown
Collaborator

@m1a2st m1a2st commented May 9, 2026

@github-actions github-actions Bot added triage PRs from the community build Gradle build or GitHub Actions small Small PRs labels May 9, 2026
Comment thread build.gradle Outdated

testFixturesApi project(':test-common:test-common-util')
testFixturesImplementation project(':test-common:test-common-util')
testFixturesApi libs.bcpkix
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we apply it to other parts as well?

Copy link
Copy Markdown
Collaborator Author

@m1a2st m1a2st May 9, 2026

Choose a reason for hiding this comment

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

No, the remaining four declarations should all stay as testFixturesApi — all of them expose library types in public method signatures of the test fixtures, so consumers need them transitively.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The api declaration will transfer the dependencies publicly, and I think that is a anti-pattern

Copy link
Copy Markdown
Member

@soarez soarez May 9, 2026

Choose a reason for hiding this comment

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

I can see logic behind carrying the dependencies forward if we know they’ll always be necessary in the dependent modules. But if we don’t want to do this the downside seems low, dependent modules will have to directly specify these. There’s advantages in being more explicit too.

@m1a2st m1a2st force-pushed the MINOR-use-testFixturesImplementation branch from 1d0da97 to 93a8e10 Compare May 9, 2026 09:41
Comment thread build.gradle Outdated
testFixturesImplementation project(':test-common:test-common-util')
testFixturesImplementation libs.bcpkix
testFixturesImplementation libs.junitJupiter
testFixturesImplementation libs.jqwik
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It seems jqwik doesn't need to be in testImplementation here, as ArbitraryMemoryRecords is only used by the raft module. Should we move ArbitraryMemoryRecords to the raft module instead?

@github-actions github-actions Bot added kraft and removed triage PRs from the community labels May 10, 2026
@chia7712 chia7712 merged commit 4bb5d39 into apache:trunk May 10, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Gradle build or GitHub Actions kraft small Small PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants