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 `completesExceptionallyWithin` to `CompletableFuture` assertions by vladykin · Pull Request #3597 · assertj/assertj

Conversation

@vladykin

@vladykin vladykin commented Sep 2, 2024

Copy link
Copy Markdown
Contributor

Issue #3587

Check List:

  • Fixes Confusing behavior of AbstractCompletableFutureAssert.failsWithin #3587
  • Unit tests : YES
  • Javadoc with a code example (on API only) : YES

Sorry, something went wrong.

Uh oh!

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

All reactions
@vladykin vladykin mentioned this pull request Sep 2, 2024
Confusing behavior of AbstractCompletableFutureAssert.failsWithin #3587
Closed
@joel-costigliola
joel-costigliola self-requested a review September 3, 2024 20:19
@joel-costigliola joel-costigliola added this to the 3.27.0 milestone Sep 3, 2024
@joel-costigliola

joel-costigliola commented Sep 3, 2024

Copy link
Copy Markdown
Member

Thanks @vladykin, I'll review the PR this week end.

All reactions

Sorry, something went wrong.

Uh oh!

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

@vladykin
vladykin force-pushed the 3.x branch from d212783 to ec7947c Compare September 4, 2024 02:13
@vladykin

vladykin commented Sep 4, 2024

Copy link
Copy Markdown
Contributor Author

Fixed code formatting that spotless plugin was complaining about

All reactions

Sorry, something went wrong.

Uh oh!

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

@vladykin

vladykin commented Sep 4, 2024

Copy link
Copy Markdown
Contributor Author

Things that I wasn't sure about and haven't yet included:

  • separate assertion failure message in case of InterruptedException (it's currently the same message for all failures);
  • note about interaction with soft assertions in the javadoc for the new methods;
  • similar methods in AbstractFutureAssert.
All reactions

Sorry, something went wrong.

Uh oh!

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

@vladykin

vladykin commented Sep 15, 2024

Copy link
Copy Markdown
Contributor Author

@joel-costigliola, any feedback on this PR?

All reactions

Sorry, something went wrong.

Uh oh!

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

@joel-costigliola

joel-costigliola commented Sep 16, 2024

Copy link
Copy Markdown
Member

I'll have a look this week

All reactions

Sorry, something went wrong.

Uh oh!

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

@joel-costigliola

joel-costigliola commented Sep 18, 2024

Copy link
Copy Markdown
Member

commented thanks @vladykin

All reactions

Sorry, something went wrong.

Uh oh!

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

@vladykin

vladykin commented Sep 20, 2024

Copy link
Copy Markdown
Contributor Author

@joel-costigliola, I don't see any comments here. Where can I find them?

I see some failed CI jobs, but there are no details besides "This job failed", so I don't know what to do, and whether it's related to my PR or not.

All reactions

Sorry, something went wrong.

Uh oh!

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

joel-costigliola
joel-costigliola reviewed Sep 20, 2024
View reviewed changes
Comment thread ...core/src/main/java/org/assertj/core/error/future/ShouldHaveCompletedExceptionallyWithin.java
import org.assertj.core.error.BasicErrorMessageFactory;
import org.assertj.core.error.ErrorMessageFactory;

public class ShouldHaveCompletedExceptionallyWithin extends BasicErrorMessageFactory {

@joel-costigliola joel-costigliola Sep 18, 2024

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.

add a unit test for this, like ShouldHaveCompletedExceptionally_create_Test

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread ...a/org/assertj/core/api/future/CompletableFutureAssert_completesExceptionallyWithin_Test.java Outdated
} catch (@SuppressWarnings("unused") InterruptedException e) {
// do nothing
}
}

@joel-costigliola joel-costigliola Sep 18, 2024

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.

Let's move these two methods in a FutureTestHelper class and replace their use in CompletableFutureAssert_failsWithin_Test

Sorry, something went wrong.

Uh oh!

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

All reactions
@joel-costigliola

joel-costigliola commented Sep 20, 2024

Copy link
Copy Markdown
Member

My bad I did confirm my review so my comments were pending

All reactions

Sorry, something went wrong.

Uh oh!

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

@joel-costigliola

joel-costigliola commented Sep 20, 2024

Copy link
Copy Markdown
Member

the issues are not related to your PR, I reran the ubuntu job and it succeeded so all good

All reactions

Sorry, something went wrong.

Uh oh!

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

@vladykin
Add AbstractCompletableFutureAssert.completesExceptionallyWithin
59d3ab8
Issue #3587
@vladykin
vladykin force-pushed the 3.x branch from ec7947c to 59d3ab8 Compare September 22, 2024 20:51
@vladykin

vladykin commented Sep 22, 2024

Copy link
Copy Markdown
Contributor Author

Thanks for the comments, addressed

All reactions

Sorry, something went wrong.

Uh oh!

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

@joel-costigliola joel-costigliola closed this Sep 22, 2024
@joel-costigliola

joel-costigliola commented Sep 22, 2024

Copy link
Copy Markdown
Member

Integrated thanks @vladykin !

All reactions

Sorry, something went wrong.

Uh oh!

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

@scordio scordio changed the title Add AbstractCompletableFutureAssert.completesExceptionallyWithin Add completesExceptionallyWithin to CompletableFuture assertions Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@joel-costigliola joel-costigliola joel-costigliola left review comments

Uh oh!

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

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

3.27.0

Development

Successfully merging this pull request may close these issues.

Confusing behavior of AbstractCompletableFutureAssert.failsWithin

Uh oh!

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

2 participants

@vladykin @joel-costigliola
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.