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

Give HeartbeatHandler the highest priority in VaadinPortletService #167

Merged
merged 2 commits into from
Dec 23, 2019

Conversation

mehdi-vaadin
Copy link
Contributor

@mehdi-vaadin mehdi-vaadin commented Dec 23, 2019

Fix #166


This change is Reviewable

@mehdi-vaadin mehdi-vaadin marked this pull request as ready for review December 23, 2019 11:28
Copy link

@denis-anisimov denis-anisimov left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 4 files at r1.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @denis-anisimov, @joheriks, and @mehdi-vaadin)


vaadin-portlet/src/main/java/com/vaadin/flow/portal/VaadinPortletService.java, line 123 at r1 (raw file):

are handles

typo ?
are handled


vaadin-portlet/src/main/java/com/vaadin/flow/portal/VaadinPortletService.java, line 126 at r1 (raw file):

handlers.add(new HeartbeatHandler());

Wont't it added twice ? (also in super.createRequestHandlers() ).
So is it totally forgotten and handled incorrectly by PortletUidlRequestHandler or just
has a wrong order ?


vaadin-portlet-integration-tests/tests-generic/src/test/java/com/vaadin/flow/portal/requesthandlers/HeartbeatHandlerIT.java, line 38 at r1 (raw file):

Thread.sleep(35000);

Looks quite long timeout. Can it be reduced ?

Copy link
Contributor Author

@mehdi-vaadin mehdi-vaadin left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @denis-anisimov, @joheriks, and @mehdi-vaadin)


vaadin-portlet/src/main/java/com/vaadin/flow/portal/VaadinPortletService.java, line 123 at r1 (raw file):

Previously, denis-anisimov (Denis) wrote…
are handles

typo ?
are handled

Done.


vaadin-portlet/src/main/java/com/vaadin/flow/portal/VaadinPortletService.java, line 126 at r1 (raw file):

Previously, denis-anisimov (Denis) wrote…
handlers.add(new HeartbeatHandler());

Wont't it added twice ? (also in super.createRequestHandlers() ).
So is it totally forgotten and handled incorrectly by PortletUidlRequestHandler or just
has a wrong order ?

You're right. I removed the extra one.
It's handled by PortletUidlRequestHandler and not by HeartbeatHandler. With changing the order it's handled by the correct handler.


vaadin-portlet-integration-tests/tests-generic/src/test/java/com/vaadin/flow/portal/requesthandlers/HeartbeatHandlerIT.java, line 38 at r1 (raw file):

Previously, denis-anisimov (Denis) wrote…
Thread.sleep(35000);

Looks quite long timeout. Can it be reduced ?

I guess it should be fine. I reduced it.

Copy link

@denis-anisimov denis-anisimov left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 3 of 3 files at r2.
Dismissed @vaadin-bot from a discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @joheriks)

ButtonElement buttonElement = getFirstPortlet().$(ButtonElement.class)
.first();

Thread.sleep(17000);

Choose a reason for hiding this comment

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

MAJOR Remove this use of "Thread.sleep()". rule

@vaadin-bot
Copy link

SonarQube analysis reported 3 issues

  • MAJOR 1 major
  • MINOR 1 minor
  • INFO 1 info

Watch the comments in this conversation to review them.

2 extra issues

Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

  1. MINOR VaadinPortletService.java#L74: Rename this field "DEFAULT_HANDLER" to match the regular expression '^[a-z][a-zA-Z0-9]*$'. rule
  2. INFO VaadinPortletService.java#L247: Complete the task associated to this TODO comment. rule

Copy link
Contributor Author

@mehdi-vaadin mehdi-vaadin left a comment

Choose a reason for hiding this comment

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

Dismissed @vaadin-bot from a discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @joheriks)

@mehdi-vaadin mehdi-vaadin merged commit 75300c8 into master Dec 23, 2019
@mehdi-vaadin mehdi-vaadin deleted the fix-heartbeat branch December 23, 2019 12:09
@mehdi-vaadin mehdi-vaadin added this to the 1.0.0.beta3 milestone Dec 23, 2019
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.

Portlet not responding after the first Heartbeat request
3 participants