Skip to content

Commit

Permalink
ViewCompilationServiceTests: remove non-deterministic assert
Browse files Browse the repository at this point in the history
  • Loading branch information
exyi committed Jan 31, 2024
1 parent f62afd4 commit 376f259
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Tests/Runtime/ViewCompilationServiceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using DotVVM.Framework.Controls;
using DotVVM.Framework.Hosting;
using DotVVM.Framework.Testing;
using Microsoft.AspNetCore.Authorization.Infrastructure;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.VisualStudio.TestTools.UnitTesting;

Expand Down Expand Up @@ -101,7 +100,7 @@ public void MasterPage()
Assert.AreEqual(CompilationState.CompletedSuccessfully, route.Status);
Assert.IsNotNull(masterPage);
Assert.AreEqual(masterPage, service.GetMasterPages().FirstOrDefault(m => m.VirtualPath == "MasterPage.dothtml"));
Assert.AreEqual(CompilationState.None, masterPage.Status);
// Assert.AreEqual(CompilationState.None, masterPage.Status); // it's not deterministic, because the master page is built asynchronously after the view asks for its viewmodel type
service.BuildView(masterPage, out _);
Assert.AreEqual(CompilationState.CompletedSuccessfully, masterPage.Status);
}
Expand Down

0 comments on commit 376f259

Please sign in to comment.