#16720 avoid failing because of temporary Chrome internal files#16722
#16720 avoid failing because of temporary Chrome internal files#16722asolntsev merged 1 commit intoSeleniumHQ:trunkfrom
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