Skip to content

Conversation

@labkey-tchad
Copy link
Member

@labkey-tchad labkey-tchad commented Jan 21, 2026

Rationale

Something in Gradle 9.3 changed how it detects JUnit tests. Gradle only recognizes test classes that meet certain criteria. Adding a RunWith annotation to our test runner is the most straightforward.
Additionally scanForTestClasses needs to be enabled, though this seems to be a direct contradiction of the Gradle documentation.

Execution failed for task ':server:testAutomation:ciTestsPostgres18'. org.gradle.api.internal.exceptions.MarkedVerificationException: There are test sources present and no filters are applied, but the test task did not discover any tests to execute. This is likely due to a misconfiguration. Please check your test configuration. If this is not a misconfiguration, this error can be disabled by setting the 'failOnNoDiscoveredTests' property to false.

Related Pull Requests

Changes

  • Make uiTests task work with Gradle 9.3
  • Use lazy task configuration

Copy link
Contributor

@labkey-susanh labkey-susanh left a comment

Choose a reason for hiding this comment

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

Gradle is usually pretty good about warning about breaking changes like this. Probably I missed something in previous release notes...

dependsOn(initPropertiesTask)
}
project.tasks.withType(RunTestSuite).configureEach { it ->
scanForTestClasses = true // Required for Gradle 9.3
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is required because we are using an older version of JUnit. If I'm understanding correctly, "JUnit Platform" was introduced with JUnit 5. So, could make a note here about possibly removing this if we update our version of JUnit.

@labkey-tchad labkey-tchad merged commit 091b00c into develop Jan 21, 2026
7 checks passed
@labkey-tchad labkey-tchad deleted the fb_gradle_9.3.0 branch January 21, 2026 18:28
@labkey-tchad labkey-tchad added this to the 26.02 milestone Jan 21, 2026
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