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

Rename TestModule#test #4124

Open
lihaoyi opened this issue Dec 13, 2024 · 1 comment
Open

Rename TestModule#test #4124

lihaoyi opened this issue Dec 13, 2024 · 1 comment
Milestone

Comments

@lihaoyi
Copy link
Member

lihaoyi commented Dec 13, 2024

Right now with the normal convention of unit tests in object test extends JavaTests, object integration extends JavaTests, etc., there is no way for a user to select only unit tests via a query: __.integration resolves only integration tests, but __.test resolves both unit tests and integration tests via .integration.test. We could tell everyone to say object unit extends JavaTests, but that goes against most project filesystem layout conventions.

In 0.13.0 we should rename the def test method to something else, def testFork or something, to remove this name collision

@lihaoyi lihaoyi added this to the 0.13.0 milestone Dec 13, 2024
@lefou
Copy link
Member

lefou commented Dec 13, 2024

Technically, you can select __:^integration.test but that's not what we really want.

I wonder if we can come up with some solution that unifies the test state holder for the various ways to run a test. Currently, running test and testCached don't share their results. So testCached need to run, even when we run test before. Same for testOnly or a testFork. If we instead move the state from the T.dest into some module state than all test* tasks could operate on the same state. We could just share some testState task (persistent or a worker), but this would require some more logic to ensure we don't run multiple test tasks against it. Maybe there are some other solutions or some abstractions we can create.

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

No branches or pull requests

2 participants