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

DEV: Capture logs for all tests in spec/system/assign_topic_spec.rb #542

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

tgxworld
Copy link
Contributor

@tgxworld tgxworld commented Jan 4, 2024

Why this change?

We have been getting flaky test failures from these specs and the failure screenshot shows that the user is not logged in when it is supposed to be. Futher investigation shows that when the test flakes, it is because the request to view the topic is using an auth token that is different from the one which was created when the user was signed in.

What does this change do?

  1. Add the capture_log metadata to all the tests in this file.

  2. Enables the verbose_auth_token_logging site setting to give us more debugging information in the logs.

Why this change?

We have been getting flaky test failures from these specs and the
failure screenshot shows that the user is not logged in when it is
supposed to be. Futher investigation shows that when the test flakes, it
is because the request to view the topic is using an auth token that is
different from the one which was created when the user was signed in.

What does this change do?

1. Add the `capture_log` metadata to all the tests in this file.

2. Enables the `verbose_auth_token_logging` site setting to give us more
   debugging information in the logs.
Comment on lines +14 to +15
# The system tests in this file are flaky and auth token related so turning this on
SiteSetting.verbose_auth_token_logging = true
Copy link
Contributor

Choose a reason for hiding this comment

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

😿

Lol would be funny if you turn it on and it stops flaking.

@tgxworld tgxworld merged commit 87e74f7 into main Jan 4, 2024
7 checks passed
@tgxworld tgxworld deleted the capture_active_record_logs branch January 4, 2024 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants