[ https://issues.apache.org/jira/browse/GEODE-8572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17208369#comment-17208369 ]
ASF GitHub Bot commented on GEODE-8572: --------------------------------------- demery-pivotal opened a new pull request #5595: URL: https://github.com/apache/geode/pull/5595 Changed LogExporter to refrain from attempting to read directories, even when a directory's path matches the exporter's file selector predicates. Changed LogExporterIntegrationTest to configure the server to write files in a unique subdirectory of the current working directory. Some tests were configuring the server to use a temporary folder that could be reused by other tests. Thank you for submitting a contribution to Apache Geode. In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: ### For all changes: - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [ ] Has your PR been rebased against the latest commit within the target branch (typically `develop`)? - [ ] Is your initial contribution a single, squashed commit? - [ ] Does `gradlew build` run cleanly? - [ ] Have you written or updated unit tests to verify your changes? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? ### Note: Please ensure that once the PR is submitted, check Concourse for build issues and submit an update to your PR as soon as possible. If you need help, please send an email to d...@geode.apache.org. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > LogExporter throws if a directory matches its file selector > ----------------------------------------------------------- > > Key: GEODE-8572 > URL: https://issues.apache.org/jira/browse/GEODE-8572 > Project: Geode > Issue Type: Bug > Components: gfsh > Affects Versions: 1.13.0 > Reporter: Dale Emery > Priority: Major > Labels: GeodeOperationAPI > > {{LogExporter}} tries to read and export any directory entry whose name is > accepted by its log file selector predicate. The predicate accepts any entry > whose name, when converted to lower case, contains ".log". If one of those > entries is directory, the predicate accepts it anyway. When {{LogExporter}} > attempts to create a {{FileReader}} read it, the {{FileReader}} constructor > throws {{FileNotFoundException}}. > There is a stat file selector predicate that works similarly. > {{LogExporter}}'s log and stat file selector predicates should accept only > files, and not directories. And perhaps the should accept only files whose > names _end_ in the appropriate extension, rather than _containing_ the > characters. The predicates are defined in {{LogExporter}}'s > {{findLogFiles()}} and {{findStatFiles()}} methods. > I discovered this defect by running {{LogExporterIntegrationTest}} on macOS. > Each test's preparation writes some to-be-exported files into a temporary > directory that, on macOS, may contain numerous other files and directories. > One of those directories (e.g. > /var/folders/yz/6y59fxln38d7lf2jxng1zgg40000gn/T/com.apple.LoginUserService), > which matches the {{LogExporter}}'s predicate. > These tests should also be changed to write their to-be-exported files to a > directory that is known to be empty. -- This message was sent by Atlassian Jira (v8.3.4#803005)