Beispiel #1
0
 public void Dispose()
 {
     // We only attempt to check open/closed state if there were no other test
     // failures.
     try
     {
         if (FailureMarker.WasSuccessful() && Dir.Open)
         {
             Assert.Fail("Directory not closed: " + Dir);
         }
     }
     finally
     {
         // TODO: perform real close of the delegate: LUCENE-4058
         // dir.close();
     }
 }
Beispiel #2
0
 public void Dispose()
 {
     // only if there were no other test failures.
     if (FailureMarker.WasSuccessful())
     {
         if (file.Exists)
         {
             try
             {
                 TestUtil.Rm(file);
             }
             catch (IOException e)
             {
                 throw new IOException("Could not remove temporary location '" + file.FullName + "', created at stack trace:\n" + CreationStack, e);
             }
         }
     }
 }