[SERVER-34371] Stop ignoring errors when the test fixture fails to delete data files Created: 06/Apr/18 Updated: 29/Oct/23 Resolved: 13/Jun/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Testing Infrastructure |
| Affects Version/s: | None |
| Fix Version/s: | 3.2.21, 3.4.16, 3.6.6, 4.0.0-rc6, 4.1.1 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Tess Avitabile (Inactive) | Assignee: | David Bradford (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Backport Requested: |
v4.0, v3.6, v3.4, v3.2
|
||||||||||||
| Sprint: | TIG 2018-06-18 | ||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 16 | ||||||||||||
| Story Points: | 2 | ||||||||||||
| Description |
|
The standalone test fixture attempts to delete data files before starting a node. We ignore errors when deleting data files, so we don't know if the deletion was successful. An example of when a deletion could fail is on Windows when another process is keeping the file open. When we fail to delete data files, tests can fail because they expect to start up with clean data files. We should add logging to understand when we fail to delete data files. |
| Comments |
| Comment by Githook User [ 18/Jun/18 ] | |||||||||||||
|
Author: {'username': 'dbradf', 'name': 'David Bradford', 'email': 'david.bradford@mongodb.com'}Message: (cherry picked from commit 90a2fd2a17c24589b1fa1fd98c5a07dbca78b1b2) | |||||||||||||
| Comment by Githook User [ 18/Jun/18 ] | |||||||||||||
|
Author: {'username': 'dbradf', 'name': 'David Bradford', 'email': 'david.bradford@mongodb.com'}Message: (cherry picked from commit 90a2fd2a17c24589b1fa1fd98c5a07dbca78b1b2) | |||||||||||||
| Comment by Githook User [ 18/Jun/18 ] | |||||||||||||
|
Author: {'username': 'dbradf', 'name': 'David Bradford', 'email': 'david.bradford@mongodb.com'}Message: (cherry picked from commit 90a2fd2a17c24589b1fa1fd98c5a07dbca78b1b2) | |||||||||||||
| Comment by Githook User [ 13/Jun/18 ] | |||||||||||||
|
Author: {'username': 'dbradf', 'name': 'David Bradford', 'email': 'david.bradford@mongodb.com'}Message: (cherry picked from commit 90a2fd2a17c24589b1fa1fd98c5a07dbca78b1b2) | |||||||||||||
| Comment by Githook User [ 13/Jun/18 ] | |||||||||||||
|
Author: {'username': 'dbradf', 'name': 'David Bradford', 'email': 'david.bradford@mongodb.com'}Message: | |||||||||||||
| Comment by Max Hirschhorn [ 13/Jun/18 ] | |||||||||||||
|
I'm reopening this ticket because it seems like there was some confusion in the changes to be made. We should stop ignoring errors from shutil.rmtree() except in the case where the specified path doesn't exist at all. The goal of making this change is to verify there aren't other places where path manipulation inside of resmoke.py causes some files to not get removed. (see | |||||||||||||
| Comment by Githook User [ 12/Jun/18 ] | |||||||||||||
|
Author: {'username': 'dbradf', 'name': 'David Bradford', 'email': 'david.bradford@mongodb.com'}Message: (cherry picked from commit 85d4c70b894b3f2ebc19115a573bf01b27ac89e1) | |||||||||||||
| Comment by Githook User [ 12/Jun/18 ] | |||||||||||||
|
Author: {'username': 'dbradf', 'name': 'David Bradford', 'email': 'david.bradford@mongodb.com'}Message: | |||||||||||||
| Comment by Max Hirschhorn [ 07/Apr/18 ] | |||||||||||||
|
We'll still want to suppress the errors we'd otherwise see from the subdirectories not existing. It is probably sufficient to skip calling shutil.rmtree() if os.path.lexists() returns false.
|