Changeset 11483
- Timestamp:
- 10/21/14 10:31:39 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchScriptTest.cs
r11466 r11483 25 25 using System.Linq; 26 26 using System.Reflection; 27 using System.Threading; 27 28 using HeuristicLab.Common; 28 29 using HeuristicLab.Core; … … 44 45 private const string SamplesDirectory = SamplesUtils.Directory; 45 46 47 private readonly ManualResetEvent manualResetEvent = new ManualResetEvent(false); 48 46 49 [ClassInitialize] 47 50 public static void MyClassInitialize(TestContext testContext) { … … 70 73 } 71 74 finally { 75 script.ScriptExecutionFinished += script_ExecutionFinished; 72 76 script.Execute(); 73 77 var vs = script.VariableStore; … … 96 100 } 97 101 finally { 102 script.ScriptExecutionFinished += script_ExecutionFinished; 98 103 script.Execute(); 99 104 var vs = script.VariableStore; … … 122 127 } 123 128 finally { 129 script.ScriptExecutionFinished += script_ExecutionFinished; 124 130 script.Execute(); 125 131 var vs = script.VariableStore; … … 148 154 } 149 155 finally { 150 script.Execute(); 156 script.ScriptExecutionFinished += script_ExecutionFinished; 157 script.Execute(); 158 manualResetEvent.WaitOne(); 151 159 var vs = script.VariableStore; 152 160 var solution = (IClassificationSolution)vs["demo_bestSolution"]; … … 191 199 } 192 200 } 201 202 private void script_ExecutionFinished(object sender, EventArgs a) { 203 manualResetEvent.Set(); 204 } 193 205 #endregion 194 206 }
Note: See TracChangeset
for help on using the changeset viewer.