Skip to content

Introduce methods to change SerializerRegistry used by test workers.#24088

Closed
dubinsky wants to merge 1 commit intogradle:masterfrom
dubinsky:override-worker-parameter-serializers
Closed

Introduce methods to change SerializerRegistry used by test workers.#24088
dubinsky wants to merge 1 commit intogradle:masterfrom
dubinsky:override-worker-parameter-serializers

Conversation

@dubinsky
Copy link

@dubinsky dubinsky commented Mar 1, 2023

Introduce methods to change SerializerRegistry used by test workers.

Context

I am working on a plugin that supports testing Scala and ScalaJS code using test frameworks that implement sbt.testing.Framework.

I need to convey to the test workers, in addition to the test class name, framework-specific information obtained during test discovery. To do that, I need to use a parameter serializer other than the currently hard-coded TestEventSerializer.

Proposed change satisfies this need; without it, I will have to include in my plugin modified versions of the three Gradle classes - hundreds of lines of code!

Contributor Checklist

  • Review Contribution Guidelines
  • Make sure that all commits are signed off to indicate that you agree to the terms of Developer Certificate of Origin.
  • Make sure all contributed code can be distributed under the terms of the Apache License 2.0, e.g. the code was written by yourself or the original code is licensed under a license compatible to Apache License 2.0.
  • Check "Allow edit from maintainers" option in pull request so that additional changes can be pushed by Gradle team
  • Provide integration tests (under <subproject>/src/integTest) to verify changes from a user perspective
  • Provide unit tests (under <subproject>/src/test) to verify logic
  • Update User Guide, DSL Reference, and Javadoc for public-facing changes
  • Ensure that tests pass sanity check: ./gradlew sanityCheck
  • Ensure that tests pass locally: ./gradlew <changed-subproject>:quickTest

Gradle Core Team Checklist

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation

@dubinsky dubinsky requested a review from a team as a code owner March 1, 2023 03:30
@dubinsky dubinsky requested review from a team and big-guy March 1, 2023 03:30
@bot-gradle bot-gradle added the from:contributor PR by an external contributor label Mar 1, 2023
Signed-off-by: Leonid Dubinsky <dub@podval.org>
@marcphilipp marcphilipp removed the request for review from a team March 2, 2023 08:01
@dubinsky
Copy link
Author

dubinsky commented Mar 9, 2023

I found a workaround (encode additional information I need to get to the test worker into the class name before forking).
I can run sbt tests without this change to the Gradle code now ;)
Sorry for the noise.

@dubinsky dubinsky closed this Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

from:contributor PR by an external contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants