[GODRIVER-2876] Automatically clean up "mtest" resources Created: 23/Jun/23 Updated: 06/Dec/23 Resolved: 14/Aug/23 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | Testing |
| Affects Version/s: | None |
| Fix Version/s: | 1.13.0, 1.13.1 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Matt Dale | Assignee: | Matt Dale |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Documentation Changes: | Not Needed | ||||
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
||||
| Description |
|
Currently all tests must run defer mt.Close after calling mtest.New to make sure mtest cleans up all of the server-side resources it created to run the test. That pattern is error-prone, possibly leading to tests that don't clean up server-side resources. Instead, we should make the cleanup process automatic by using T.Cleanup and remove mt.Close. Definition of done:
|
| Comments |
| Comment by Githook User [ 14/Aug/23 ] |
|
Author: {'name': 'Matt Dale', 'email': '9760375+matthewdale@users.noreply.github.com', 'username': 'matthewdale'}Message: |
| Comment by Matt Dale [ 08/Aug/23 ] |