Commit be61e9a
authored
FEAT: adding tests for connection pooling speed and basic functionality (#103)
This pull request introduces new functionality to test connection
pooling in the `mssql_python` library, along with some minor updates to
imports in the test file. The most significant changes include adding
tests for connection pooling speed and basic functionality, as well as
updating the import statement to include the `pooling` module.
### Connection pooling tests:
*
[`tests/test_003_connection.py`](diffhunk://#diff-ca315ffd463e0f93f3d45ace0869a4a3b1e572941da6723d7e9ce028cf9d2278R182-R225):
Added `test_connection_pooling_speed` to measure the performance
improvement when using connection pooling compared to no pooling.
Includes assertions to validate that pooled connections are faster.
*
[`tests/test_003_connection.py`](diffhunk://#diff-ca315ffd463e0f93f3d45ace0869a4a3b1e572941da6723d7e9ce028cf9d2278R182-R225):
Added `test_connection_pooling_basic` to verify the functionality of
connection pooling with a small pool size, ensuring connections are
reused and respecting the pool size limit. Includes assertions and
exception handling for edge cases.
### Import updates:
*
[`tests/test_003_connection.py`](diffhunk://#diff-ca315ffd463e0f93f3d45ace0869a4a3b1e572941da6723d7e9ce028cf9d2278L14-R15):
Updated import statement to include the `pooling` module, which is
required for the new connection pooling tests.1 parent 918b328 commit be61e9a
1 file changed
Lines changed: 47 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
177 | 178 | | |
178 | 179 | | |
179 | 180 | | |
180 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
181 | 226 | | |
0 commit comments