-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
#16720 avoid failing because of temporary Chrome internal files #16722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#16720 avoid failing because of temporary Chrome internal files #16722
Conversation
…iles ... that Chrome downloads and immediately deletes.
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
User description
... that Chrome downloads and immediately deletes.
🔗 Related Issues
Fixes #16720
🔄 Types of changes
PR Type
Bug fix
Description
Handle temporary Chrome files deleted during download listing
Catch NoSuchFileException when file attributes cannot be read
Filter out files with invalid modification times from results
Diagram Walkthrough
flowchart LR A["listDownloadedFiles"] --> B["stream files"] B --> C["getFileInfo"] C --> D["readAttributes"] D --> E{"File exists?"} E -->|Yes| F["return DownloadedFile"] E -->|No| G["catch NoSuchFileException"] G --> H["return DownloadedFile with -1 values"] F --> I["filter by lastModifiedTime > 0"] H --> I I --> J["collect results"]File Walkthrough
LocalNode.java
Handle temporary Chrome files in download listingjava/src/org/openqa/selenium/grid/node/local/LocalNode.java
NoSuchFileExceptionto handle missing filesgetFileInfo()method to catchNoSuchFileExceptionand returna DownloadedFile with -1 sentinel values
listDownloadedFiles()to exclude files with invalidmodification times (value of -1)
internal files during listing