GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add support for additional configuration parameters resources by robinjhector · Pull Request #3345 · junit-team/junit-framework

Conversation

@robinjhector

@robinjhector robinjhector commented Jun 8, 2023 •
edited by marcphilipp
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Overview

This commit adds support for specifying a properties file, for use with configuration parameters.

  • Added a new field configurationParametersResources of type List to store the configuration parameters resources.
  • Added new methods configurationParametersResource(String propertiesFile) and configurationParametersResources(List propertiesFiles) to add configuration parameters resources to the request builder.
  • Updated the buildLauncherConfigurationParameters() method to include the configurationParametersResources in the Builder instance.

Related to issue: #3340

Open questions:

  • The @API annotation values, what should they be? Are they experimental or set to STABLE at once? Which version nr?

I hereby agree to the terms of the JUnit Contributor License Agreement.


Definition of Done

  • There are no TODOs left in the code
  • Method preconditions are checked and documented in the method's Javadoc
  • Coding conventions (e.g. for logging) have been followed
  • Change is covered by automated tests including corner cases, errors, and exception handling
  • Public API has Javadoc and @API annotations
  • Change is documented in the User Guide and Release Notes

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mpkorstanje reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@robinjhector robinjhector mentioned this pull request Jun 8, 2023
Introduce @ConfigurationParametersResource for use with @Suite classes #3340
Closed
2 tasks
@robinjhector

robinjhector commented Jun 9, 2023

Copy link
Copy Markdown
Contributor Author

Question: I seem to have forgot about the picocli console runner. Should I add new picocli options for selecting a config resource file? (--config-resource perhaps?) in TestDiscoveryOptionsMixin.RuntimeConfigurationOptions

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sbrannen

sbrannen commented Jun 9, 2023

Copy link
Copy Markdown
Member

Question: I seem to have forgot about the picocli console runner. Should I add new picocli options for selecting a config resource file? (--config-resource perhaps?) in TestDiscoveryOptionsMixin.RuntimeConfigurationOptions

Yes, that sounds like a good idea.

Though maybe --config-resources which accepts a comma-separated list of resource paths.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sbrannen
sbrannen requested changes Jun 9, 2023
View reviewed changes

@sbrannen sbrannen left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks for submitting the PR.

I requested a few minor changes.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...launcher/src/main/java/org/junit/platform/launcher/core/LauncherDiscoveryRequestBuilder.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...rm-suite-api/src/main/java/org/junit/platform/suite/api/ConfigurationParametersResource.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...rc/test/java/org/junit/platform/suite/commons/SuiteLauncherDiscoveryRequestBuilderTests.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...rm-suite-api/src/main/java/org/junit/platform/suite/api/ConfigurationParametersResource.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@sbrannen sbrannen added component: Platform theme: suites type: new feature labels Jun 9, 2023
@robinjhector

robinjhector commented Jun 9, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Yes, that sounds like a good idea.

Though maybe --config-resources which accepts a comma-separated list of resource paths.

Or just make --config-resource repeatable, like the existing --configcli option? I think I would prefer that, instead of CSVing it.

Also; I couldn't help but notice that the CLI configuration parameters have a strict validation of unique key-value pairs (#1308). And am a bit confused how configuration resources should behave with that in mind.

I would prefer a similar approach as the suite annotations, eg. the explicit parameters take precedence over any property file based ones. Any suggestions or does that sound good?

Edit: Nevermind, I don't think it applies to this anyway. The launcher request builder is used from here, so the logic will be the same regardless.
I've updated the PR with a commit for new CLI options 👍

sbrannen reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@robinjhector
robinjhector force-pushed the configuration-parameter-resources branch 2 times, most recently from 628a605 to 1d12ffc Compare June 9, 2023 09:31
@robinjhector
robinjhector requested a review from sbrannen June 9, 2023 17:24
@robinjhector

This comment was marked as outdated.

Sign in to view
@sbrannen

This comment was marked as outdated.

Sign in to view
sbrannen
sbrannen requested changes May 28, 2024
View reviewed changes

@sbrannen sbrannen left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This is coming along nicely. 👍

I went ahead and reviewed the status quo and added a few comments.

Thank you for your efforts!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread documentation/src/docs/asciidoc/user-guide/advanced-topics/junit-platform-reporting.adoc Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...rm-suite-api/src/main/java/org/junit/platform/suite/api/ConfigurationParametersResource.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...ons/src/main/java/org/junit/platform/suite/commons/SuiteLauncherDiscoveryRequestBuilder.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread documentation/src/docs/asciidoc/user-guide/running-tests.adoc Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread documentation/src/docs/asciidoc/user-guide/running-tests.adoc Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread documentation/src/docs/asciidoc/user-guide/running-tests.adoc Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...-platform-console/src/main/java/org/junit/platform/console/options/TestDiscoveryOptions.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...form-console/src/main/java/org/junit/platform/console/options/TestDiscoveryOptionsMixin.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread junit-platform-runner/src/main/java/org/junit/platform/runner/JUnitPlatform.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@sbrannen sbrannen added the status: waiting-for-feedback label May 28, 2024
@github-actions

github-actions Bot commented Jun 12, 2024

Copy link
Copy Markdown

If you would like us to be able to process this pull request, please provide the requested information or make the requested changes. If the information is not provided or the requested changes are not made within the next 3 weeks, we will be unable to proceed and this pull request will be closed.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the status: stale label Jun 12, 2024
@github-actions

github-actions Bot commented Jul 3, 2024

Copy link
Copy Markdown

Closing due to lack of requested feedback. If you would like to proceed with your contribution, please provide the requested information or make the requested changes, and we will re-open this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot closed this Jul 3, 2024
@sbrannen

sbrannen commented Jul 3, 2024

Copy link
Copy Markdown
Member

Hi @robinjhector,

I realize quite a bit of time has passed since you originally worked on this, but do you think you'll find time to make the suggested changes and complete this PR?

If not, I imagine that someone in the team can pick it up from here.

Please let us know how you'd like to proceed.

Thanks

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sbrannen sbrannen reopened this Jul 3, 2024
@sbrannen sbrannen removed the status: stale label Jul 3, 2024
robinjhector added 3 commits July 3, 2024 12:56
@robinjhector
Add support for configuration parameters resources
3c6f2a0
This commit adds support for specifying a properties file, for use with configuration parameters.

- Added a new field configurationParametersResources of type List<String> to store the configuration parameters resources.
- Added new methods configurationParametersResource(String propertiesFile) and configurationParametersResources(List<String> propertiesFiles) to add configuration parameters resources to the request builder.
- Updated the buildLauncherConfigurationParameters() method to include the configurationParametersResources in the Builder instance.

Related to issue: junit-team#3340
@robinjhector
Review fixes
b09cded
Adjusted annotation parameter name to `value()`.
Scrapped duplicate configurationParametersResources method on discovery request builder. (Is now var-args)
@robinjhector
ConsoleLauncher options for conf param resource
5b942d5
@robinjhector
robinjhector force-pushed the configuration-parameter-resources branch from 228d6cb to a219358 Compare July 3, 2024 10:57
@robinjhector
Review fix
07b0921
@robinjhector
robinjhector force-pushed the configuration-parameter-resources branch from a219358 to 07b0921 Compare July 3, 2024 11:09
@robinjhector

robinjhector commented Jul 3, 2024

Copy link
Copy Markdown
Contributor Author

Hey @sbrannen ! Thanks for getting back to me, I have rebased and adjusted the code + documentation after your review. Sorry about the delay!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@robinjhector
checkstyle/spotless adjustments
17b1308
@robinjhector
robinjhector force-pushed the configuration-parameter-resources branch from 991729b to 17b1308 Compare July 3, 2024 11:27
@marcphilipp marcphilipp linked an issue Jul 5, 2024 that may be closed by this pull request
Introduce @ConfigurationParametersResource for use with @Suite classes #3340
Closed
2 tasks
@marcphilipp
marcphilipp requested a review from sbrannen July 8, 2024 05:39
@marcphilipp marcphilipp removed the status: waiting-for-feedback label Jul 19, 2024
marcphilipp
marcphilipp approved these changes Jul 19, 2024
View reviewed changes

@marcphilipp marcphilipp left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Looking good! I'll take it from here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread ...form-console/src/main/java/org/junit/platform/console/options/TestDiscoveryOptionsMixin.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...form-console/src/main/java/org/junit/platform/console/options/TestDiscoveryOptionsMixin.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...m-suite-api/src/main/java/org/junit/platform/suite/api/ConfigurationParametersResources.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

marcphilipp added 6 commits July 19, 2024 14:57
@marcphilipp
Polishing
edac218
@marcphilipp
Merge branch 'main' into configuration-parameter-resources
577cff5
@marcphilipp
Polish User Guide
a11d0e3
@marcphilipp
Add to release notes
cff2d39
@marcphilipp
Polish Javadoc
ccfd0fa
@marcphilipp
Fix tests
914a557
@marcphilipp marcphilipp changed the title Add support for configuration parameters resources Add support for additional configuration parameters resources Jul 19, 2024
@marcphilipp
marcphilipp merged commit be8ae70 into junit-team:main Jul 19, 2024
@marcphilipp

marcphilipp commented Jul 19, 2024

Copy link
Copy Markdown
Member

@robinjhector Thank you for your contribution! 👍

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@marcphilipp marcphilipp marcphilipp approved these changes
@sbrannen sbrannen Awaiting requested review from sbrannen

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

component: Platform theme: suites type: new feature

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Introduce @ConfigurationParametersResource for use with @Suite classes

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@robinjhector @sbrannen @marcphilipp
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.