paulirwin commented on code in PR #1084:
URL: https://github.com/apache/lucenenet/pull/1084#discussion_r1903173123


##########
src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs:
##########
@@ -3126,19 +3126,20 @@ private static void CleanupTemporaryFiles()
                 }
                 catch (Exception e) when (e.IsIOException())
                 {
-                    //                    Type suiteClass = 
RandomizedContext.Current.GetTargetType;
-                    //                    if 
(suiteClass.IsAnnotationPresent(typeof(SuppressTempFileChecks)))
-                    //                    {
-                    Console.Error.WriteLine("WARNING: Leftover undeleted 
temporary files " + e.Message);
-                    return;
-                    //                    }
+                    Type suiteClass = this.GetType();
+                    if 
(suiteClass.GetCustomAttribute<SuppressTempFileChecksAttribute>(inherit: true) 
is { } suppressAttr)
+                    {
+                        Console.Error.WriteLine($"WARNING: Leftover undeleted 
temporary files (bugUrl: {suppressAttr.BugUrl}): {e.Message}");

Review Comment:
   Split out implementing the full RuleChains as #1088. For now, I've changed 
TearDown to set that static field to false in the event of any test failure, 
which is all this logic cares about. Added a TODO to indicate that it can be 
removed when #1088 is implemented, which probably will require #1087 done first.



-- 
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.

To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to