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
fix: Fix regression when sync id check is disabled #17238
Conversation
Sonatype Lift is retiringSonatype Lift will be retiring on Sep 12, 2023, with its analysis stopping on Aug 12, 2023. We understand that this news may come as a disappointment, and Sonatype is committed to helping you transition off it seamlessly. If you’d like to retain your data, please export your issues from the web console. |
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.
@TatuLund thank you very much for spotting the bug and providing the fix.
The change looks good to me, but I would like to add a test for this case
Could use please add a test to LongPollingCacheFilterTest
class?
Something like
@Test
public void filter_syncIdCheckDisabled_continueWithCurrentMessage() {
// a value of -1 means that syncId check is disabled
setSeenServerSyncIdHeader(-1);
setTransport(AtmosphereResource.TRANSPORT.LONG_POLLING);
simulatePushConnection();
BroadcastAction action = filter.filter("broadcasterId", resource,
originalMessage, message);
Assert.assertEquals(ACTION.CONTINUE, action.action());
Assert.assertSame(
"Message should not be altered by filter if syncId check is disabled",
message, action.message());
verifyMessageIsNotCached();
}
I was already working on that, now there |
flow-server/src/test/java/com/vaadin/flow/server/communication/LongPollingCacheFilterTest.java
Outdated
Show resolved
Hide resolved
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
When syncId check is disabled, long-polling push cache filter always cached all messages. This change fixes the regression, by preventing message cache when syncId check is disabled.
When syncId check is disabled, long-polling push cache filter always cached all messages. This change fixes the regression, by preventing message cache when syncId check is disabled.
When syncId check is disabled, long-polling push cache filter always cached all messages. This change fixes the regression, by preventing message cache when syncId check is disabled.
When syncId check is disabled, long-polling push cache filter always cached all messages. This change fixes the regression, by preventing message cache when syncId check is disabled.
When syncId check is disabled, long-polling push cache filter always cached all messages. This change fixes the regression, by preventing message cache when syncId check is disabled.
When syncId check is disabled, long-polling push cache filter always cached all messages. This change fixes the regression, by preventing message cache when syncId check is disabled. Co-authored-by: Tatu Lund <tatu@vaadin.com>
When syncId check is disabled, long-polling push cache filter always cached all messages. This change fixes the regression, by preventing message cache when syncId check is disabled. Co-authored-by: Tatu Lund <tatu@vaadin.com>
When syncId check is disabled, long-polling push cache filter always cached all messages. This change fixes the regression, by preventing message cache when syncId check is disabled. Co-authored-by: Tatu Lund <tatu@vaadin.com>
When syncId check is disabled, long-polling push cache filter always cached all messages. This change fixes the regression, by preventing message cache when syncId check is disabled. Co-authored-by: Tatu Lund <tatu@vaadin.com>
When syncId check is disabled, long-polling push cache filter always cached all messages. This change fixes the regression, by preventing message cache when syncId check is disabled. Co-authored-by: Tatu Lund <tatu@vaadin.com>
This ticket/PR has been released with Vaadin 24.2.0.alpha5 and is also targeting the upcoming stable 24.2.0 version. |
When syncId check is disabled, long-polling push cache filter always cached all messages. This change fixes the regression, by preventing message cache when syncId check is disabled. Co-authored-by: Tatu Lund <tatu@vaadin.com>
Fixes: #17237