Index: src/Deltares.DSoilModel.Forms.Tests/DSoilModelPluginTests.cs =================================================================== diff -u -r411 -r412 --- src/Deltares.DSoilModel.Forms.Tests/DSoilModelPluginTests.cs (.../DSoilModelPluginTests.cs) (revision 411) +++ src/Deltares.DSoilModel.Forms.Tests/DSoilModelPluginTests.cs (.../DSoilModelPluginTests.cs) (revision 412) @@ -1,4 +1,5 @@ -using System.Linq; +using System.Diagnostics; +using System.Linq; using Deltares.DSoilModel.Data; using Deltares.Geometry.Forms; using Deltares.Geotechnics.Forms; @@ -34,8 +35,13 @@ mainForm.Visible = true; mainForm.CreateControl(); - // allow events to be processed, plugin configuration - Application.DoEvents(); + // wait for the plugin & mainform to complete initialization + var s = new Stopwatch(); + s.Start(); + while (s.Elapsed.Seconds < 30 && !mainForm.IsMainFormLoaded) + { + Application.DoEvents(); + } } [TestFixtureTearDown] @@ -78,10 +84,13 @@ private DSoilModelProject NewProject(DSoilModelPlugin p) { p.Project = new DSoilModelProject(); - + + // prevent the realtime validator from running + RealTimeBackgroundValidator.Instance.Stop(); + // allow events to be processed Application.DoEvents(); - + return p.Project; }