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

test(deltachat-rpc-client): test that webxdc realtime data is not reordered on the sender #5696

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

link2xt
Copy link
Collaborator

@link2xt link2xt commented Jun 17, 2024

Closes #5688

@link2xt
Copy link
Collaborator Author

link2xt commented Jun 17, 2024

Since there is no reordering on the core side, problem is either in the UI (both Android and Desktop) or Node.js bot here: https://github.com/link2xt/xdcterm/blob/0997b62094f9df8ab7ddc55e782fc5a5bb66a40a/index.js#L15-L23

@link2xt link2xt requested a review from iequidoo June 17, 2024 22:58
@link2xt
Copy link
Collaborator Author

link2xt commented Jun 17, 2024

The problem was fixed on the bot side: link2xt/xdcterm@b58d147

The test is useful anyway to prevent any sort of regressions in the core.

for i in range(200):
while 1:
event = ac2.wait_for_event()
if event.kind == EventType.WEBXDC_REALTIME_DATA and bytes(event.data) != b"hello":
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't the event with "hello" be consumed by wait_receive_realtime_data([(ac2_webxdc_msg, b"hello")]) above? And can it be emitted several times?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is emitted 10 times by setup_thread_send_realtime_data.

Copy link
Collaborator

@iequidoo iequidoo left a comment

Choose a reason for hiding this comment

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

Otherwise looks good, though i'm not familiar with the realtime API

@link2xt link2xt merged commit 5489b49 into main Jun 18, 2024
37 checks passed
@link2xt link2xt deleted the link2xt/webxdc-realtime-no-reordering branch June 18, 2024 18:06
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.

Realtime channels reorder messages
2 participants