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 — Document how to use `CloseableResource` by SveinKare · Pull Request #3840 · junit-team/junit-framework

Conversation

@SveinKare

@SveinKare SveinKare commented Jun 1, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Issue: #1555

Overview

Added an explanation in the user guide for how CloseableResource can be used, with an example using an HttpServer resource.


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.

All reactions
@SveinKare
Documented ClosableResource in user guide, with an example use-case f…
4cb41ce
…or an HttpServer resource.

Issue: junit-team#1555
pzygielo
pzygielo reviewed Jun 1, 2024
View reviewed changes
Comment thread documentation/src/docs/asciidoc/user-guide/extensions.adoc Outdated
that are instances of `CloseableResource` are notified by an invocation of their `close()`
method in the inverse order they were added in.

An example use-case of `ClosableResource` is shown below, using an `HttpServer` resource.

This comment was marked as resolved.

Sign in to view

Sorry, something went wrong.

Uh oh!

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

pzygielo
pzygielo reviewed Jun 1, 2024
View reviewed changes
Comment thread documentation/src/test/java/example/extensions/HttpServerExtension.java Resolved

Uh oh!

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

@SveinKare SveinKare changed the title Document how to use ClosableResource Document how to use CloseableResource Jun 1, 2024
@SveinKare
Fixed typo
ba5b9dc
Issue: junit-team#1555
@sbrannen sbrannen mentioned this pull request Jun 3, 2024
Document how to use CloseableResource #1555
Closed
1 task
@sbrannen sbrannen added theme: extensions theme: documentation component: Jupiter labels Jun 3, 2024
@sbrannen sbrannen changed the title Document how to use CloseableResource Document how to use CloseableResource Jun 3, 2024
@marcphilipp marcphilipp modified the milestone: 5.11 M3 Jun 6, 2024
@marcphilipp marcphilipp linked an issue Jun 6, 2024 that may be closed by this pull request
Document how to use CloseableResource #1555
Closed
1 task
marcphilipp
marcphilipp requested changes Jul 8, 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.

Thanks for the PR! 👍

Instead of implementing BeforeAllCallback, I think we should implement ParameterResolver for HttpServer and start the server lazily when it's first being resolved.

@SveinKare Please let me know if you have time to make this change or if you'd like me to take over.

Sorry, something went wrong.

Uh oh!

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

All reactions
@SveinKare

SveinKare commented Jul 8, 2024

Copy link
Copy Markdown
Contributor Author

@marcphilipp You can go ahead and change it

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 self-assigned this Jul 9, 2024
@marcphilipp
Change to ParameterResolver and add sample test case
1a3c8d4
marcphilipp
marcphilipp approved these changes Jul 9, 2024
View reviewed changes
@marcphilipp
marcphilipp merged commit b09aa8b into junit-team:main Jul 9, 2024
@marcphilipp

marcphilipp commented Jul 9, 2024

Copy link
Copy Markdown
Member

@SveinKare Thanks for taking care of this! 👍

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

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
+1 more reviewer
@pzygielo pzygielo pzygielo left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

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

Assignees

@marcphilipp marcphilipp

Labels

component: Jupiter theme: documentation theme: extensions

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Document how to use CloseableResource

Uh oh!

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

4 participants

@SveinKare @marcphilipp @pzygielo @sbrannen
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.