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

Fix telegram test flake #894

Merged
merged 1 commit into from
Aug 1, 2024
Merged

Fix telegram test flake #894

merged 1 commit into from
Aug 1, 2024

Conversation

makkes
Copy link
Member

@makkes makkes commented Aug 1, 2024

The test would sometimes fail because the metadata lines are built from a map and map iteration order in Go is non-deterministic. Therefore, the lines may be ordered differently between different test runs.

Now, the test sorts the metadata lines of the telegram message so they are always the same and only then verifies the expected output.

closes #867

@makkes makkes requested a review from stefanprodan August 1, 2024 11:22
The test would sometimes fail because the metadata lines are built
from a map and map iteration order in Go is non-deterministic.
Therefore, the lines may be ordered differently between different test
runs.

Now, the test sorts the metadata lines of the telegram message so they
are always the same and only then verifies the expected output.

closes #867

Signed-off-by: Max Jonas Werner <[email protected]>
@makkes makkes force-pushed the fix-telegram-test branch from 5078a7f to f9610af Compare August 1, 2024 13:51
Copy link
Member

@matheuscscp matheuscscp left a comment

Choose a reason for hiding this comment

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

LGTM!

@makkes makkes merged commit 4e01193 into main Aug 1, 2024
6 checks passed
@makkes makkes deleted the fix-telegram-test branch August 1, 2024 20:13
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.

Telegram test is flaky
3 participants