Skip to content

Commit 0ca6b54

Browse files
authored
[java] Allow linting only on the default test (#10792)
After migrating Selenium tests to JUnit 5, java_junit5_test delegates to contrib_rules_jvm’s java_test, and that adds lint tests for every target. We want to add one set of lint tests, since the rest are going to be identical. Therefore, we tag all but one test with no-lint
1 parent 776cb82 commit 0ca6b54

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

java/private/selenium_test.bzl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ def selenium_test(name, test_class, size = "medium", browsers = BROWSERS.keys(),
8484
test_class = test_class,
8585
size = size,
8686
jvm_flags = BROWSERS[browser]["jvm_flags"] + jvm_flags,
87-
tags = BROWSERS[browser]["tags"] + tags,
87+
# Only allow linting on the default test
88+
tags = BROWSERS[browser]["tags"] + tags + ([] if test == name else ["no-lint"]),
8889
data = BROWSERS[browser]["data"] + data,
8990
**stripped_args
9091
)

0 commit comments

Comments
 (0)