Skip to content

Commit

Permalink
[internal] Add missing timeout field to target generators (#16314)
Browse files Browse the repository at this point in the history
The PR #16126 was missing adding the test timeout fields to the `core_fields` class var in the target generators.

[ci skip-rust]
[ci skip-build-wheels]
  • Loading branch information
alonsodomin authored Aug 2, 2022
1 parent 23fc6b1 commit ea46136
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/python/pants/backend/helm/target_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ class HelmUnitTestTestsGeneratorTarget(TargetFilesGenerator):
HelmUnitTestTimeoutField,
)
generated_target_cls = HelmUnitTestTestTarget
copied_fields = (*COMMON_TARGET_FIELDS, HelmUnitTestTimeoutField, HelmUnitTestStrictField)
moved_fields = (HelmUnitTestDependenciesField,)
copied_fields = (*COMMON_TARGET_FIELDS, HelmUnitTestStrictField)
moved_fields = (HelmUnitTestDependenciesField, HelmUnitTestTimeoutField)
help = f"Generates a `{HelmUnitTestTestTarget.alias}` target per each file in the `{HelmUnitTestGeneratingSourcesField.alias}` field."


Expand Down
8 changes: 3 additions & 5 deletions src/python/pants/backend/java/target_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,11 @@ class JavaTestsGeneratorSourcesField(JavaGeneratorSourcesField):

class JunitTestsGeneratorTarget(TargetFilesGenerator):
alias = "junit_tests"
core_fields = (
*COMMON_TARGET_FIELDS,
JavaTestsGeneratorSourcesField,
)
core_fields = (*COMMON_TARGET_FIELDS, JavaTestsGeneratorSourcesField, JunitTestTimeoutField)
generated_target_cls = JunitTestTarget
copied_fields = (*COMMON_TARGET_FIELDS, JunitTestTimeoutField)
copied_fields = COMMON_TARGET_FIELDS
moved_fields = (
JunitTestTimeoutField,
JvmDependenciesField,
JvmJdkField,
JvmProvidesTypesField,
Expand Down
4 changes: 3 additions & 1 deletion src/python/pants/backend/kotlin/target_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,14 @@ class KotlinJunitTestsGeneratorTarget(TargetFilesGenerator):
core_fields = (
*COMMON_TARGET_FIELDS,
KotlinJunitTestsGeneratorSourcesField,
JunitTestTimeoutField,
)
generated_target_cls = KotlinJunitTestTarget
copied_fields = (*COMMON_TARGET_FIELDS, JunitTestTimeoutField)
copied_fields = COMMON_TARGET_FIELDS
moved_fields = (
KotlinJunitTestDependenciesField,
KotlincConsumedPluginIdsField,
JunitTestTimeoutField,
JvmResolveField,
JvmJdkField,
JvmProvidesTypesField,
Expand Down
4 changes: 3 additions & 1 deletion src/python/pants/backend/scala/target_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,14 @@ class ScalatestTestsGeneratorTarget(TargetFilesGenerator):
*COMMON_TARGET_FIELDS,
ScalatestTestsGeneratorSourcesField,
ScalatestTestsSourcesOverridesField,
ScalatestTestTimeoutField,
)
generated_target_cls = ScalatestTestTarget
copied_fields = (*COMMON_TARGET_FIELDS, ScalatestTestTimeoutField)
copied_fields = COMMON_TARGET_FIELDS
moved_fields = (
ScalaDependenciesField,
ScalaConsumedPluginNamesField,
ScalatestTestTimeoutField,
JvmJdkField,
JvmProvidesTypesField,
JvmResolveField,
Expand Down

0 comments on commit ea46136

Please sign in to comment.