Repository: typeorm/typeorm
File: test/functional/driver/mysql/connection-options/enable-query-timeout.ts (TypeScript)

Code before:
            })
        })

        beforeEach(() => reloadTestingDatabases(dataSources))
        after(() => closeTestingConnections(dataSources))

        it("should throw a query execution timeout error for the query when it exceeds the maxQueryExecutionTime", async () => {
            await Promise.all(
                dataSources.map(async (dataSource) => {
                    let errorThrown = false
                    try {
                        await dataSource.manager.query(
                            `SELECT SLEEP(${longQueryTimeSec})`,
                        )
                    } catch (err) {
                        errorThrown = true
                        expect(err).to.have.nested.property(
                            "driverError.code",
                            "PROTOCOL_SEQUENCE_TIMEOUT",
                        )
                        expect(err).to.have.nested.property(
                            "driverError.timeout",
                            timeoutMs,
                        )
                    }
                    expect(errorThrown).to.be.true
                }),
            )
        })

        it("should not throw a query execution timeout error for the query when it runs within the maxQueryExecutionTime", async () => {
            await Promise.all(
                dataSources.map(async (dataSource) => {
                    let errorThrown = false
                    try {
                        await dataSource.manager.query(
                            `SELECT SLEEP(${shortQueryTimeSec})`,
                        )
                    } catch (err) {
                        errorThrown = true
                    }
                    expect(errorThrown).to.be.false
                }),
            )
        })
    })

    describe("when enableQueryTimeout is not provided", () => {
        let datasources: DataSource[]

        before(async () => {

Review comment (suggestion):
```suggestion
        it("should not throw a query execution timeout error for the query when it runs within the maxQueryExecutionTime", () =>
```

Code after:
            })
        })

        beforeEach(() => reloadTestingDatabases(dataSources))
        after(() => closeTestingConnections(dataSources))

        it("should throw a query execution timeout error for the query when it exceeds the maxQueryExecutionTime", () =>
            Promise.all(
                dataSources.map(async (dataSource) => {
                    await expect(
                        dataSource.manager
                            .sql`SELECT SLEEP(${longQueryTimeSec})`,
                    ).to.eventually.be.rejected.then((err) => {
                        expect(err).to.have.nested.property(
                            "driverError.code",
                            "PROTOCOL_SEQUENCE_TIMEOUT",
                        )
                        expect(err).to.have.nested.property(
                            "driverError.timeout",
                            timeoutMs,
                        )
                    })
                }),
            ))

        it("should not throw a query execution timeout error for the query when it runs within the maxQueryExecutionTime", async () =>
            Promise.all(
                dataSources.map(async (dataSource) => {
                    await expect(
                        dataSource.manager
                            .sql`SELECT SLEEP(${shortQueryTimeSec})`,
                    ).to.eventually.be.fulfilled
                }),
            ))
    })

    describe("when enableQueryTimeout is not provided", () => {
        let datasources: DataSource[]

        before(async () => {
            datasources = await createTestingConnections({
                ...commonConnectionOptions,
                driverSpecific: { maxQueryExecutionTime: timeoutMs },
            })
        })

        after(() => closeTestingConnections(datasources))

        it("should not throw a query execution timeout error", () =>
            Promise.all(
                datasources.map(async (dataSource) => {