[ 
https://issues.apache.org/jira/browse/GEODE-8555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17204741#comment-17204741
 ] 

ASF GitHub Bot commented on GEODE-8555:
---------------------------------------

sabbey37 commented on a change in pull request #5569:
URL: https://github.com/apache/geode/pull/5569#discussion_r497525577



##########
File path: 
geode-junit/src/main/java/org/apache/geode/internal/cache/DiskRegionTestingBase.java
##########
@@ -200,6 +202,19 @@ protected void deleteFiles() {
     tempDir.delete();
   }
 
+  protected void forceDeleteFiles() {
+    closeDiskStores();
+    File file = tempDir.getRoot();
+    File[] files = file.listFiles();
+    for (File each : files) {
+      try {
+        FileUtils.forceDelete(each);
+      } catch (IOException e) {
+        LogService.getLogger().error("Caught", e);

Review comment:
       I'd definitely like to do something more than just logging the error, 
but not all of the files are deleted (like `statsstats.gfs` file).  The 
`statsstats.gfs` file doesn't have to be deleted, though.  We wrapped the 
`FileUtils.forceDelete(each);` method line with a `if 
(!each.getName().contains(".gfs"))` since that file doesn't have to be deleted. 
 Let me know what you think!




----------------------------------------------------------------
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:
[email protected]


> SimpleDiskRegionJunitTest fails on Windows
> ------------------------------------------
>
>                 Key: GEODE-8555
>                 URL: https://issues.apache.org/jira/browse/GEODE-8555
>             Project: Geode
>          Issue Type: Test
>          Components: core
>    Affects Versions: 1.14.0
>            Reporter: Raymond Ingles
>            Assignee: Sarah Abbey
>            Priority: Major
>              Labels: pull-request-available
>
> Updating Junit to 4.13, one test failed on Windows due to failure to delete 
> some temporary test files.
> https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-develop-main/jobs/WindowsCoreIntegrationTestOpenJDK8/builds/455
> {code:java}
> org.apache.geode.internal.cache.SimpleDiskRegionJUnitTest > testBasicClose 
> FAILED
>     java.lang.AssertionError:  Exception in createOverflowOnly due to 
> java.lang.IllegalStateException: The region "/testRegion" has been persisted 
> to disk so it can not be recreated on the same disk store without 
> persistence. Either destroy the persistent region, recreate it as overflow 
> and persistent, or create the overflow only region on a different disk store.
>         at org.junit.Assert.fail(Assert.java:89)
>         at 
> org.apache.geode.internal.cache.SimpleDiskRegionJUnitTest.testBasicClose(SimpleDiskRegionJUnitTest.java:75)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to