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


##########
src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs:
##########
@@ -938,6 +937,10 @@ public virtual void TearDown()
 
             if (result.ResultState == ResultState.Failure || 
result.ResultState == ResultState.Error)
             {
+                // LUCENENET specific - Track that at least one test in the 
suite failed.
+                // LUCENENET TODO: finish implementation of RuleChains so this 
is not needed (#1088)
+                SuiteFailureMarker = false;

Review Comment:
   There is nothing resetting this back to `true`, so the first failure will 
cascade to the other tests. I think we were better off with this hard coded to 
`true` because this will leave lots of temp files on the disk for passing tests.



##########
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:
   I don't think the rule chain makes any sense for these particular features 
because NUnit manages these in static context so we don't have to re-invent the 
wheel. But, since these are all now listed in #1017 we can do those separately.



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