PromucFlow_constructor/app/server/appsmith-plugins
Nilansh Bansal 25e83f6603
fix: fixed mysql plugin tests by closing the connections (#36657)
## Description
- This PR fixes the MySql plugin server unit tests which started to fail
after increasing the max connection pool size from 5 to
[20](https://github.com/appsmithorg/appsmith/pull/36631/files). The
failures were due to the `Too Many Connections` error because of the
connections not getting closed.
- In this PR, I have added the code to close connections after each test
is executed.


Fixes #36656 
## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/11147034776>
> Commit: 3b9f5791cbd8d95f74f4a89ad204d1d4152445e0
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=11147034776&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Wed, 02 Oct 2024 16:20:15 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **Bug Fixes**
- Updated the expected default value for the maximum connection pool
size in tests to ensure accuracy.

- **Chores**
- Improved management of MySQL connection context to prevent resource
leaks in tests.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Manish Kumar <107841575+sondermanish@users.noreply.github.com>
2024-10-02 21:58:14 +05:30
..
amazons3Plugin fix: logger-not-working-in-plugins (#36231) 2024-09-17 10:47:58 +01:00
anthropicPlugin chore: Upgrading spring to 3.3.3 to resolve vulnerable dependencies (#36266) 2024-10-01 22:12:56 +05:30
appsmithAiPlugin chore: Upgrading spring to 3.3.3 to resolve vulnerable dependencies (#36266) 2024-10-01 22:12:56 +05:30
arangoDBPlugin fix: logger-not-working-in-plugins (#36231) 2024-09-17 10:47:58 +01:00
awsLambdaPlugin fix: logger-not-working-in-plugins (#36231) 2024-09-17 10:47:58 +01:00
databricksPlugin fix: logger-not-working-in-plugins (#36231) 2024-09-17 10:47:58 +01:00
dynamoPlugin fix: logger-not-working-in-plugins (#36231) 2024-09-17 10:47:58 +01:00
elasticSearchPlugin fix: logger-not-working-in-plugins (#36231) 2024-09-17 10:47:58 +01:00
firestorePlugin fix: logger-not-working-in-plugins (#36231) 2024-09-17 10:47:58 +01:00
googleAiPlugin chore: Upgrading spring to 3.3.3 to resolve vulnerable dependencies (#36266) 2024-10-01 22:12:56 +05:30
googleSheetsPlugin chore: Upgrading spring to 3.3.3 to resolve vulnerable dependencies (#36266) 2024-10-01 22:12:56 +05:30
graphqlPlugin chore: Upgrading spring to 3.3.3 to resolve vulnerable dependencies (#36266) 2024-10-01 22:12:56 +05:30
jsPlugin chore: Applied Spotless formatter (#25173) 2023-07-07 00:43:11 +05:30
mongoPlugin chore: Upgrading spring to 3.3.3 to resolve vulnerable dependencies (#36266) 2024-10-01 22:12:56 +05:30
mssqlPlugin chore: Disable MSSql tests as test container is unable to accept connection (#36451) 2024-09-20 17:09:57 +05:30
mysqlPlugin fix: fixed mysql plugin tests by closing the connections (#36657) 2024-10-02 21:58:14 +05:30
openAiPlugin chore: Upgrading spring to 3.3.3 to resolve vulnerable dependencies (#36266) 2024-10-01 22:12:56 +05:30
oraclePlugin fix: logger-not-working-in-plugins (#36231) 2024-09-17 10:47:58 +01:00
postgresPlugin fix: logger-not-working-in-plugins (#36231) 2024-09-17 10:47:58 +01:00
redisPlugin chore: Disable MSSql tests as test container is unable to accept connection (#36451) 2024-09-20 17:09:57 +05:30
redshiftPlugin fix: logger-not-working-in-plugins (#36231) 2024-09-17 10:47:58 +01:00
restApiPlugin chore: Upgrading spring to 3.3.3 to resolve vulnerable dependencies (#36266) 2024-10-01 22:12:56 +05:30
saasPlugin fix: logger-not-working-in-plugins (#36231) 2024-09-17 10:47:58 +01:00
smtpPlugin fix: logger-not-working-in-plugins (#36231) 2024-09-17 10:47:58 +01:00
snowflakePlugin chore: Upgrading spring to 3.3.3 to resolve vulnerable dependencies (#36266) 2024-10-01 22:12:56 +05:30
pom.xml fix: logger-not-working-in-plugins (#36231) 2024-09-17 10:47:58 +01:00