diff --git a/test/Microsoft.ML.AutoML.Tests/AutoMLExperimentTests.cs b/test/Microsoft.ML.AutoML.Tests/AutoMLExperimentTests.cs index 2ba57483d2..13e4916166 100644 --- a/test/Microsoft.ML.AutoML.Tests/AutoMLExperimentTests.cs +++ b/test/Microsoft.ML.AutoML.Tests/AutoMLExperimentTests.cs @@ -148,8 +148,7 @@ public async Task AutoMLExperiment_return_current_best_trial_when_ct_is_canceled res.Metric.Should().BeGreaterThan(0); } - //https://github.com/dotnet/machinelearning/issues/7203 - [X86X64Fact("Fails on Linux Arm machines")] + [Fact] public async Task AutoMLExperiment_finish_training_when_time_is_up_Async() { var context = new MLContext(1); @@ -167,12 +166,12 @@ public async Task AutoMLExperiment_finish_training_when_time_is_up_Async() { var channel = serviceProvider.GetService(); var settings = serviceProvider.GetService(); - return new DummyTrialRunner(settings, 0, channel); + return new DummyTrialRunner(settings, 1, channel); }) .SetTuner(); var cts = new CancellationTokenSource(); - cts.CancelAfter(10 * 1000); + cts.CancelAfter(100 * 1000); var res = await experiment.RunAsync(cts.Token); res.Metric.Should().BeGreaterThan(0); @@ -446,6 +445,7 @@ public void Dispose() public async Task RunAsync(TrialSettings settings, CancellationToken ct) { _logger.Info("Update Running Trial"); + ct.ThrowIfCancellationRequested(); await Task.Delay(_finishAfterNSeconds * 1000, ct); ct.ThrowIfCancellationRequested(); _logger.Info("Update Completed Trial");