You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2021/12/22 16:24:19 UTC

[lucenenet] 03/04: Lucene.Net.TestFramework.Store.MockIndexOutputWrapper::CheckDiskFull(): Completed implementation to write thread name and stack trace in Verbose mode.

This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit 279fbb17922abd5bf2e49e022b8ac7c3251d94c2
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Wed Dec 22 22:00:52 2021 +0700

    Lucene.Net.TestFramework.Store.MockIndexOutputWrapper::CheckDiskFull(): Completed implementation to write thread name and stack trace in Verbose mode.
---
 src/Lucene.Net.TestFramework/Store/MockIndexOutputWrapper.cs | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/Lucene.Net.TestFramework/Store/MockIndexOutputWrapper.cs b/src/Lucene.Net.TestFramework/Store/MockIndexOutputWrapper.cs
index cf61b84..db72c1d 100644
--- a/src/Lucene.Net.TestFramework/Store/MockIndexOutputWrapper.cs
+++ b/src/Lucene.Net.TestFramework/Store/MockIndexOutputWrapper.cs
@@ -1,4 +1,5 @@
-using System;
+using Lucene.Net.Util;
+using System;
 using System.IO;
 using System.Threading;
 using Console = Lucene.Net.Util.SystemConsole;
@@ -93,12 +94,11 @@ namespace Lucene.Net.Store
                     message += "; wrote " + freeSpace + " of " + len + " bytes";
                 }
                 message += ")";
-                // LUCENENET TODO: Finish implementation
-                /*if (LuceneTestCase.VERBOSE)
+                if (LuceneTestCase.Verbose)
                 {
-                  Console.WriteLine(Thread.CurrentThread.Name + ": MDW: now throw fake disk full");
-                  (new Exception()).printStackTrace(System.out);
-                }*/
+                    Console.WriteLine(Thread.CurrentThread.Name + ": MDW: now throw fake disk full");
+                    Console.WriteLine(Environment.StackTrace);
+                }
                 throw new IOException(message);
             }
         }