Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add TCK tests for configuring @Timeout attributes #555

Merged
merged 1 commit into from
Jun 19, 2020

Conversation

Ladicek
Copy link
Contributor

@Ladicek Ladicek commented Jun 5, 2020

Signed-off-by: Ladislav Thon [email protected]

@Ladicek
Copy link
Contributor Author

Ladicek commented Jun 5, 2020

Contributes to #407.

@Ladicek
Copy link
Contributor Author

Ladicek commented Jun 5, 2020

Also I shamelessly copied #554 here, so thanks @Azquelt :-)

@Ladicek Ladicek force-pushed the timeout-config-test branch from d9bf513 to 72fc486 Compare June 5, 2020 12:50
Copy link
Member

@Azquelt Azquelt left a comment

Choose a reason for hiding this comment

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

Thanks 👍

*/
@ApplicationScoped
public class TimeoutConfigBean {
@Timeout(value = 1, unit = ChronoUnit.MILLIS)
Copy link
Member

Choose a reason for hiding this comment

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

Since @Timeout has a lot of advantages when used together with @Asynchronous, I am wondering add @Asynchronous on one of the endpoint might be good. Thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the config test?

Copy link
Member

Choose a reason for hiding this comment

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

We're only testing timeout config here. Do you think we need a specific test for config when @Timeout and @Asynchronous are used together?

In general I prefer tests to remain focused. This class just tests Timeout + config while we have other tests for Timeout + async.

Copy link
Member

Choose a reason for hiding this comment

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

Do we have Timeout + async + config? The reason is that timeout is better off to be used with @Asynchronous. We need to ensure the config works. I will be ok to skip Timeout with config and vote for Timeout+Asynchronous with config.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

timeout is better off to be used with @asynchronous

Why is that?

We need to ensure the config works

We do. This PR does that. @Asynchronous makes no difference whatsoever.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(Actually it might make a difference, depending on implementation, but so can putting the annotation on a class, or configuring an annotation parameter for all methods in a class, or configuring an annotation parameter globally. We decided to stick to this form of testing and I don't quite see how @Asynchronous is so very relevant.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In any case, I have just changed one test from synchronous to @Asynchronous.

@Ladicek Ladicek force-pushed the timeout-config-test branch from 72fc486 to 70aa2fd Compare June 11, 2020 12:18
Copy link
Member

@Emily-Jiang Emily-Jiang left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @Ladicek !

@Ladicek Ladicek merged commit 5fb645a into eclipse:master Jun 19, 2020
@Ladicek Ladicek deleted the timeout-config-test branch June 19, 2020 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants