Skip to content

TCK tests of Asynchronous repository method#1456

Merged
njr-11 merged 7 commits into
jakartaee:mainfrom
njr-11:tck-tests-for-asynchronous-repository-methods
Jun 1, 2026
Merged

TCK tests of Asynchronous repository method#1456
njr-11 merged 7 commits into
jakartaee:mainfrom
njr-11:tck-tests-for-asynchronous-repository-methods

Conversation

@njr-11
Copy link
Copy Markdown
Member

@njr-11 njr-11 commented May 20, 2026

Adds a couple of TCK tests to cover Asynchronous on a repository method.
The tests include logic to check whether Jakarta Concurrency is present in the environment and if not present, the tests skip themselves.

@njr-11 njr-11 added this to the 1.1 milestone May 20, 2026
@njr-11 njr-11 added the test Something test-related label May 20, 2026
@njr-11 njr-11 mentioned this pull request May 20, 2026
47 tasks
@jakarta.nosql.Entity
@jakarta.persistence.Entity
public class Account {
@jakarta.nosql.Id
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do you mind putting a line here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Do you mind putting a line here?

I don't understand your question. My best guess is that you want a new line prior to the Id annotation. I added a commit that does that:

d882dfc

@gavinking
Copy link
Copy Markdown
Member

@njr-11 I would like to better understand your intention with this one. As the spec is written today, I believe async repositories are not required:

NOTE: Every Jakarta Data provider is encouraged, but not required, to support asynchronous repository methods returning java.util.concurrent.CompletionStage.

How is a provider which does not support CompletionStage going to indicate that to the TCK?

@njr-11
Copy link
Copy Markdown
Member Author

njr-11 commented May 29, 2026

How is a provider which does not support CompletionStage going to indicate that to the TCK?

Thanks for spotting that - I included logic to allow for Concurrency spec not being available, but forgot to include the catch block that tolerates the former like we have elsewhere throughout the TCK. This falls under the general category of unsupported repository method signatures, but I'll also add a note to the specification pointing out how to reject it.

Corrections are included in:
c9cd9cb

@gavinking
Copy link
Copy Markdown
Member

OK thanks.

Comment thread tck/src/main/java/ee/jakarta/tck/data/web/async/Accounts.java Outdated
Copy link
Copy Markdown
Member

@gavinking gavinking left a comment

Choose a reason for hiding this comment

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

Cool, thanks!

@njr-11 njr-11 merged commit afda036 into jakartaee:main Jun 1, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Something test-related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants