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

Allow absence of Java tests in a module #421

Open
alexander-yevsyukov opened this issue Oct 27, 2022 · 0 comments
Open

Allow absence of Java tests in a module #421

alexander-yevsyukov opened this issue Oct 27, 2022 · 0 comments
Labels
/Build Build tasks tech. debt What made us slow in dev?
Milestone

Comments

@alexander-yevsyukov
Copy link
Contributor

The current configuration for Tests tasks requires that a module has Java tests. It's good, of course, because testing is important. But our configuration makes the build complain even if there are tests in Kotlin. Here's the code:

fun TaskContainer.registerTestTasks() {
    withType(Test::class.java).configureEach {
        filter {
            includeTestsMatching("*Test")
            includeTestsMatching("*Spec")
        }
    }
    register<FastTest>("fastTest").let {
        register<SlowTest>("slowTest") {
            shouldRunAfter(it)
        }
    }
}

There is a workaround for this issue. Creation of a file under test/java/ which does one dummy @Test. It looks ugly, but works.

We need to improve the extension method above so that we can write Kotlin-only tests if we want to.

@alexander-yevsyukov alexander-yevsyukov added /Build Build tasks tech. debt What made us slow in dev? labels Oct 27, 2022
@alexander-yevsyukov alexander-yevsyukov added this to the M1 milestone Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
/Build Build tasks tech. debt What made us slow in dev?
Projects
None yet
Development

No branches or pull requests

1 participant