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 — Provide mechanism for managing resources across engines and executions by YongGoose · Pull Request #4281 · junit-team/junit-framework

Conversation

@YongGoose

@YongGoose YongGoose commented Jan 27, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Resolves #2816

Overview

  • Designing a class to manage context at the platform level
  • Adding a session-level store to LauncherSession
  • Adding a request-level store to Launcher
  • Exposing the request-level store in EngineDiscoveryRequest and TestPlan ExecutionRequest
  • Utilizing the request-level store in ExtensionContext
  • Tests for Jupiter, Suite engine, EngineTestKit etc.

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.

YongGoose and chadongmin reacted with thumbs up emoji YongGoose and chadongmin reacted with hooray emoji YongGoose and chadongmin reacted with heart emoji YongGoose and chadongmin reacted with rocket emoji
All reactions
  • 👍 2 reactions
  • 🎉 2 reactions
  • ❤️ 2 reactions
  • 🚀 2 reactions
@YongGoose
YongGoose force-pushed the feature/2816 branch from f6fe9f1 to 02ef45b Compare January 27, 2025 11:52
@YongGoose

YongGoose commented Jan 27, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

What's the use case for this method? Test engines don't have access to the Launcher so we'll need to pass this store as part of LauncherDiscoveryRequest and ExecutionRequest, don't we?

I’ve drafted an initial version 02ef45b , but I think there’s still a lot of room for improvement.
If you could point out any mistakes I’ve made, I’ll make sure to fix them right away.

Even though I’ve been studying, I find it quite challenging.

PS. While resolving a git conflict, I accidentally included the commit history from the main branch, So i create a new PR 😁

All reactions

Sorry, something went wrong.

Uh oh!

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

@YongGoose

YongGoose commented Jan 27, 2025

Copy link
Copy Markdown
Contributor Author

@marcphilipp

I think you must be very busy with the release of version 5.12 M1.
Please feel free to leave your comments whenever it’s convenient for you.

marcphilipp 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.

@YongGoose YongGoose mentioned this pull request Feb 1, 2025
Implement Parallel Method Execution in JUnit-Vintage engine #4242
Merged
6 tasks done
@marcphilipp
marcphilipp self-requested a review February 1, 2025 10:38
@YongGoose

YongGoose commented Feb 6, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

@marcphilipp

This PR is something I’ve personally been eager to work on for a long time.
However, I still don’t have a clear sense of how to proceed with it.

If this feature gets added to JUnit 5, it would be a huge learning opportunity for me and a great addition to my skill set.
That said, I don’t want to cause any fatigue for the JUnit team—especially you, Marc.

So if you feel that I’m not quite ready to take on this PR yet, please let me know, and I’ll close it.
Either way, I’ll keep looking for other issues and do my best to contribute! 🙂

I think I sounded a bit too weak.
After completing the other PR, I will make sure to implement this perfectly, no matter what.

But if you’re willing to let me see it through, I’ll do my best as always.
I’ll likely need more guidance than usual compared to other tasks.

marcphilipp 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.

marcphilipp
marcphilipp reviewed Feb 9, 2025
View reviewed changes
Comment thread junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ExtensionContext.java Resolved

Uh oh!

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

Comment thread ...ngine/src/main/java/org/junit/platform/engine/support/store/NamespacedHierarchicalStore.java Resolved

Uh oh!

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

Comment thread junit-platform-engine/src/main/java/org/junit/platform/engine/Namespace.java Resolved

Uh oh!

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

Comment thread junit-platform-engine/src/main/java/org/junit/platform/engine/Namespace.java Resolved

Uh oh!

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

Comment thread junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/DefaultLauncher.java Resolved

Uh oh!

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

Comment thread ...platform-launcher/src/main/java/org/junit/platform/launcher/core/DefaultLauncherSession.java Resolved

Uh oh!

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

YongGoose
YongGoose commented Feb 12, 2025
View reviewed changes
Comment thread ...piter-engine/src/main/java/org/junit/jupiter/engine/descriptor/AbstractExtensionContext.java Resolved

Uh oh!

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

@YongGoose
YongGoose force-pushed the feature/2816 branch 3 times, most recently from c9d5ac0 to 7d98e9a Compare February 13, 2025 10:48
YongGoose
YongGoose commented Feb 13, 2025
View reviewed changes
Comment thread junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/LauncherFactory.java Resolved

Uh oh!

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

@YongGoose
YongGoose requested a review from marcphilipp February 13, 2025 12:06
YongGoose
YongGoose commented Feb 18, 2025
View reviewed changes
Comment thread ...orm-launcher/src/main/java/org/junit/platform/launcher/core/EngineExecutionOrchestrator.java Resolved

Uh oh!

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

@YongGoose
YongGoose force-pushed the feature/2816 branch from 7b47567 to d72090c Compare February 21, 2025 10:43
marcphilipp
marcphilipp reviewed Feb 24, 2025
View reviewed changes
Comment thread platform-tests/src/test/java/org/junit/platform/launcher/core/DefaultLauncherTests.java Resolved

Uh oh!

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

YongGoose
YongGoose commented Feb 25, 2025
View reviewed changes

@YongGoose YongGoose left a comment •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

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.

Removing the store from the discovery process sounds like a good idea.
As the next step, I will proceed with the following task.

  • Tests for Jupiter, Suite engine, EngineTestKit etc.

Thank you, Marc!

Sorry, something went wrong.

Uh oh!

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

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

Uh oh!

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

Comment thread ...platform-launcher/src/main/java/org/junit/platform/launcher/core/DefaultLauncherSession.java Resolved

Uh oh!

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

Comment thread ...platform-launcher/src/main/java/org/junit/platform/launcher/core/DefaultLauncherSession.java Resolved

Uh oh!

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

Comment thread junit-platform-launcher/src/main/java/org/junit/platform/launcher/LauncherSession.java Resolved

Uh oh!

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

@YongGoose

YongGoose commented Mar 3, 2025

Copy link
Copy Markdown
Contributor Author

@marcphilipp

While working on the tests, I have a question.

As per your guidance, I am adding tests for JupiterEngine, SuiteEngine, and EngineKit. However, I am wondering if SuiteEngine requires furthermore testing.

Since the main focus of this PR is adding request-level and session-level stores, I am designing the tests around that.

The execute method in SuiteEngine utilizes the requestLevelStore from ExecutionRequest to run multiple tests. In my view, the core role of execute is to execute multiple tests, and this functionality is already being validated by existing tests.

Do you think any additional tests are needed for SuiteEngine?

PS. I truly appreciate how you not only explain things but also implement the code to make communication more efficient—it’s been incredibly helpful. 👍🏻
However, this time, I’d like to try implementing it on my own! 🙂

All reactions

Sorry, something went wrong.

Uh oh!

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

marcphilipp
marcphilipp reviewed Mar 5, 2025
View reviewed changes
Comment thread ...testFixtures/java/org/junit/platform/launcher/core/NamespacedHierarchicalStoreProviders.java Resolved

Uh oh!

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

@marcphilipp

marcphilipp commented Mar 5, 2025

Copy link
Copy Markdown
Member

The execute method in SuiteEngine utilizes the requestLevelStore from ExecutionRequest to run multiple tests. In my view, the core role of execute is to execute multiple tests, and this functionality is already being validated by existing tests.

Do you think any additional tests are needed for SuiteEngine?

I was thinking about a very basic tests that verifies that SuiteEngine passes along the requestLevelStore to test engines. It's probably sufficient to mock SuiteLauncher and check that a non-null store is passed to it.

YongGoose 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.

YongGoose and others added 10 commits March 8, 2025 15:37
@YongGoose
Generate ResourceContext for store resources
66891a5
Issue: junit-team#2816
Signed-off-by: yongjunhong <[email protected]>
@YongGoose
Add getStore method in LauncherSession
7b8182c
Issue: junit-team#2816
Signed-off-by: yongjunhong <[email protected]>
@YongGoose
Add Namespace by reusing Jupiter's Namespace class
d475bcf
Issue: junit-team#2816
@YongGoose
Apply comment
f25bec2
Issue: junit-team#2816
@YongGoose
Adding a request-level store to Launcher
7068fff
Issue: junit-team#2816
@YongGoose
Apply comment
dea6ecc
Issue: junit-team#2816
@YongGoose
Generate ResourceContext for store resources
d940bd4
Issue: junit-team#2816
Signed-off-by: yongjunhong <[email protected]>
@YongGoose
Add Namespace by reusing Jupiter's Namespace class
faebb0c
Issue: junit-team#2816
@YongGoose
Apply comment
365228d
Issue: junit-team#2816
@YongGoose
Adding a request-level store to Launcher
6018ff2
Issue: junit-team#2816
@marcphilipp marcphilipp added the theme: suites label Mar 25, 2025
marcphilipp
marcphilipp reviewed Mar 25, 2025
View reviewed changes
Comment thread platform-tests/src/test/java/org/junit/platform/launcher/core/LauncherFactoryTests.java Resolved

Uh oh!

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

Comment thread platform-tests/src/test/java/org/junit/platform/launcher/core/LauncherFactoryTests.java Resolved

Uh oh!

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

@marcphilipp

marcphilipp commented Mar 25, 2025

Copy link
Copy Markdown
Member

@YongGoose I'll discuss this PR with the team on Friday and will leave it open until then.

YongGoose reacted with thumbs up emoji YongGoose reacted with eyes emoji
All reactions
  • 👍 1 reaction
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

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

YongGoose and others added 3 commits March 25, 2025 22:14
@YongGoose @marcphilipp
Update platform-tests/src/test/java/org/junit/platform/launcher/core/…
ad6fae0
…LauncherFactoryTests.java

Co-authored-by: Marc Philipp <[email protected]>
@YongGoose @marcphilipp
Update platform-tests/src/test/java/org/junit/platform/launcher/core/…
a367dd9
…LauncherFactoryTests.java

Co-authored-by: Marc Philipp <[email protected]>
@YongGoose
Merge branch 'main' into feature/2816
219a194
@marcphilipp
marcphilipp marked this pull request as ready for review March 25, 2025 15:21
@marcphilipp
marcphilipp self-requested a review March 25, 2025 15:21
@YongGoose
Merge branch 'main' into feature/2816
1de6773
YongGoose
YongGoose commented Mar 28, 2025
View reviewed changes

@YongGoose YongGoose left a comment •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor Author

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.

Documentation work is always challenging. 🤯 I’ve added comments where I felt additional explanation or improvements might be helpful.

Thank you, as always, for taking the time to provide feedback on my work! 🙇🏻

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread documentation/src/test/java/example/sharedresources/SharedResourceTest.java Resolved

Uh oh!

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

Comment thread documentation/src/docs/asciidoc/user-guide/advanced-topics/launcher-api.adoc Resolved

Uh oh!

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

Comment thread documentation/src/docs/asciidoc/user-guide/advanced-topics/launcher-api.adoc Resolved

Uh oh!

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

Comment thread documentation/src/docs/asciidoc/user-guide/advanced-topics/launcher-api.adoc Resolved

Uh oh!

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

Comment thread documentation/src/docs/asciidoc/user-guide/advanced-topics/launcher-api.adoc Resolved

Uh oh!

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

Comment thread documentation/src/test/java/example/session/CloseableServerSocket.java Resolved

Uh oh!

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

@YongGoose
YongGoose force-pushed the feature/2816 branch from c226c8c to 682aa65 Compare March 28, 2025 01:38
@YongGoose
Add document and changes in release-notes
53161c9
@YongGoose
YongGoose force-pushed the feature/2816 branch from 682aa65 to 53161c9 Compare March 28, 2025 08:33
YongGoose and others added 3 commits March 28, 2025 17:51
@YongGoose
Merge branch 'main' into feature/2816
2cc5ba1
@marcphilipp
Apply feedback from team call
677648a
@YongGoose
Merge branch 'main' into feature/2816
9cfcb92
@YongGoose

YongGoose commented Mar 29, 2025

Copy link
Copy Markdown
Contributor Author

@marcphilipp
I reviewed the changes 677648a, and I think limiting the scope to define the range is a great approach. 👍🏻

In the previous method, we had to add new methods every time we wanted to extend functionality, which was a drawback. However, with these changes, the flexibility for expansion has significantly improved.

Would it be okay to ask if there were any further discussions about this PR during the team meeting?

All reactions

Sorry, something went wrong.

Uh oh!

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

@marcphilipp
Polish documentation
a238326
marcphilipp
marcphilipp approved these changes Mar 31, 2025
View reviewed changes
marcphilipp added 2 commits March 31, 2025 14:59
@marcphilipp
Merge remote-tracking branch 'origin/main' into fork/YongGoose/featur…
e0b5482
…e/2816
@marcphilipp
Merge branch 'main' into fork/YongGoose/feature/2816
a125cb6
@marcphilipp

marcphilipp commented Mar 31, 2025

Copy link
Copy Markdown
Member

@mpkorstanje @leonard84 Is this something that can be adopted in the Cucumber/Spock engines?

YongGoose and dfee-tm reacted with eyes emoji
All reactions
  • 👀 2 reactions

Sorry, something went wrong.

Uh oh!

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

@marcphilipp
Polish release note entry
f6e21a2
@marcphilipp
marcphilipp merged commit 468ce37 into junit-team:main Mar 31, 2025
@marcphilipp

marcphilipp commented Mar 31, 2025

Copy link
Copy Markdown
Member

@YongGoose Thank you for all your hard work! 👍 🙇

YongGoose reacted with thumbs up emoji YongGoose reacted with heart emoji YongGoose reacted with rocket emoji
All reactions
  • 👍 1 reaction
  • ❤️ 1 reaction
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

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

@YongGoose

YongGoose commented Mar 31, 2025

Copy link
Copy Markdown
Contributor Author

Thank you for all your hard work! 👍 🙇

This project was personally very challenging for me. In the beginning, there were moments when I considered giving up, but instead of wasting time on such thoughts, I decided to put in even more effort and give it my all.

As I kept pushing forward, two months flew by, and I was finally able to complete the task.
Thank you so much @marcphilipp. I truly believe that I could never have accomplished this without your help. 🙇🏻‍♂️

I will do my best in the next task as well, just as I did with this one. 💪🏻
I am always grateful to you.

marcphilipp reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

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

@marcphilipp

marcphilipp commented Mar 31, 2025

Copy link
Copy Markdown
Member

Would it be okay to ask if there were any further discussions about this PR during the team meeting?

Sure! We took a few steps back and discussed whether we need this at all. In the end, we decided we do since it "resource management" was the reason for introducing LauncherSession{Listener} in the first place and this mechanism provides a proper way of interacting with such resources in tests without having to use static variables or system properties.

YongGoose reacted with thumbs up emoji YongGoose reacted with heart emoji
All reactions
  • 👍 1 reaction
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

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

@kriegfrj kriegfrj mentioned this pull request Jun 30, 2025
[junit-platform] Tester incompatible with JUnit Platform 1.13.x bndtools/bnd#6651
Closed
@YongGoose YongGoose mentioned this pull request Nov 2, 2025
Change default ExtensionContextScope to TEST_METHOD and allow extensions to opt out #5086
Open
3 tasks
@YongGoose YongGoose mentioned this pull request Dec 28, 2025
📢오픈소스 기여모임 - 운영진 소개 opensource-contributors-group/opensource-contributors#2
Open
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

Uh oh!

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

Assignees

No one assigned

Labels

component: Jupiter component: Platform theme: execution theme: extensions theme: suites

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Provide mechanism for managing resources across engines and executions

Uh oh!

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

2 participants

@YongGoose @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.