Browse Source

Refactor stability tests: remove manual stability test and enhance finalizer stability check

Marcin Ziąbek 3 months ago
parent
commit
e7f0e21af5
1 changed files with 2 additions and 14 deletions
  1. 2 14
      Source/QuestPDF.ReportSample/Tests.cs

+ 2 - 14
Source/QuestPDF.ReportSample/Tests.cs

@@ -48,25 +48,13 @@ namespace QuestPDF.ReportSample
         }
         
         [Test]
-        [Ignore("This test is for manual testing only.")]
-        public void StabilityTesting()
-        {
-            Parallel.ForEach(Enumerable.Range(0, 1000), i =>
-            {
-                var model = DataSource.GetReport();
-                var report = new StandardReport(model);
-                report.GeneratePdf();
-            });
-        }
-        
-        [Test]
-        [Ignore("This test is for manual testing only.")]
+        [Description("This test is important, as it checks if all IDisposables are properly disposed, and there are no memory leaks.")]
         public async Task CheckFinalizersStability()
         {
             Settings.EnableCaching = true;
 
             Report.GeneratePdf();
-            Report.GenerateImages();
+            Report.GenerateImages(new ImageGenerationSettings { RasterDpi = 72 });
             Report.GenerateSvg();
 
             if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))