matrix-org / matrix-org/mjolnir

The Logging in integration tests is problematic

Open
#195 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

T-Enhancement
Dominant language
TypeScript
Stars
445
Forks
75
Avg merge
2d 44m
Merged PRs (30d)
3

Description

1. We have far too many irrelevant calls to `LogService.error` from the matrix-bot-sdk MatrixClient for things that are expected ie getting a 404 when checking for the existence of a room alias or querying state events. This is causing a sort of alarm fatigue and makes it harder to look for the causes of problems in a full run (`yarn test:integration`).

2. Mocha writes to the output stream in a completely inconsistent order to `LogService`. it can make the logs from `MatrixClient` or other components appear as though they are a result of a calls from a different test than what Mocha says has failed or has started running. Not sure if this is something from Mocha not awaiting test callbacks or something else.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running `yarn test:integration` and observing the interaction between Mocha output and `LogService`. Inspect the MatrixClient calls that emit `LogService.error` for expected 404 responses, along with the integration-test setup that controls output. Done means expected calls no longer create misleading errors and test logs preserve useful test context.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
observability, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.