Closed hylkevds closed 2 years ago
@andsel: Ready for review. The build issue is fixed, on the build-server the initial retained publish was processed slow enough for the subscription to finish first, causing the initial publish to be sent to the subscriber, and not the retained message. The test is more robust now.
@hylkevds another quick note, these tests seems more suitable to be parameterized test: https://junit.org/junit5/docs/current/user-guide/#writing-tests-parameterized-tests
@hylkevds another quick note, these tests seems more suitable to be parameterized test: https://junit.org/junit5/docs/current/user-guide/#writing-tests-parameterized-tests
Yep, I copied the test from ServerIntegrationQoSValidationTest
, we should convert that one too at some point.
Was stolen from cpp practice, m stay for member, it dates when Moquette was started and the same practice was used by Apache Felix, so I stool the idea. But the time proven, it's useless, also the 'this.' with ide like idea are just more text to read.
Il dom 20 feb 2022, 19:58 Hylke van der Schaaf @.***> ha scritto:
@.**** commented on this pull request.
In broker/src/test/java/io/moquette/integration/ServerIntegrationRetainTest.java https://github.com/moquette-io/moquette/pull/658#discussion_r810669265:
- private static IConfig m_config;
- private static Server m_server;
No problem. What was the reason you used that prefix originally?
— Reply to this email directly, view it on GitHub https://github.com/moquette-io/moquette/pull/658#discussion_r810669265, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH5RUPHBVOXQRGYUEUYIBDU4E2U3ANCNFSM5O3PERJA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were assigned.Message ID: @.***>
Hi @hylkevds, left just a couple of notes about the naming (
not
vsnon
)
Is that a convention you use? Since nonretained is the proper English variant. the sentence
send (a) not retained publish
is not correct English. While the sentence
send (a) nonretained publish
is correct... Hence my automatic use of the "non" variant. Even the MQTT standard uses non-retained...
Since there are other instances of not- i've committed your suggestions. It's better to do language changes like that, if we decide to make them, in a separate PR.
@hylkevds about https://github.com/moquette-io/moquette/pull/658#issuecomment-1050650027 my bad, keep the non
This PR adds a test for, and fixes #653.
Retained messages used a difference code-path that skipped the Session, and thus did not properly set up in-flight status. To fix this, this PR:
retained
flag to this code-pathretained
flag toSessionRegistry.PublishedMessage
so the flag is stored for queued messages