Skip to content

remove mock.Context usage in production code #53388

@lcwangchao

Description

@lcwangchao

Enhancement

It's better to remove the mock.Context usages in TiDB production code. The reason is that mock.Context is not designed for production code. It is designed for testing, that means some values in it are not reasonable in production and some values will be modified by the developer without any care.

We can replace some code that uses mock.Context with some "static" context we introduced before such as StaticExprContext or DistSQLContext

Tasks

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementThe issue or PR belongs to an enhancement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions