Skip to content

Commit

Permalink
Merge branch 'task/system-text-json-migration' into issue/OCC-245
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahelsaig committed Jul 24, 2024
2 parents ce1f989 + 33b946b commit 2f9899e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
using Lombiq.Tests.UI.Extensions;
using Lombiq.Tests.UI.Services;
using Shouldly;
using System;
using System.Threading.Tasks;
using static Lombiq.Hosting.Tenants.IdleTenantManagement.Tests.UI.Constants.IdleTenantData;

namespace Lombiq.Hosting.Tenants.IdleTenantManagement.Tests.UI.Extensions;

public static class IdleTenantManagementExtensions
{
public static void SetMaxIdleMinutesAndLoggingForUITest(
this OrchardCoreUITestExecutorConfiguration configuration) => configuration.OrchardCoreConfiguration.BeforeAppStart +=
public static void SetMaxIdleMinutesAndLoggingForUITest(this OrchardCoreUITestExecutorConfiguration configuration) =>
configuration.OrchardCoreConfiguration.BeforeAppStart +=
(_, argumentsBuilder) =>
{
argumentsBuilder
Expand All @@ -24,8 +23,7 @@ public static void SetMaxIdleMinutesAndLoggingForUITest(
return Task.CompletedTask;
};

public static readonly Func<IWebApplicationInstance, Task> AssertAppLogsWithIdleCheckAsync =
async webApplicationInstance =>
public static async Task AssertAppLogsWithIdleCheckAsync(this IWebApplicationInstance webApplicationInstance) =>
(await webApplicationInstance.GetLogOutputAsync())
.ShouldContain($"Shutting down tenant \"{IdleTenantName}\" because of idle timeout.");
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,8 @@ await context.GoToSetupPageAndSetupOrchardCoreAsync(
// working as intended.
await context.SignInDirectlyAsync();
await context.GoToDashboardAsync();

// Make sure the shutdown message is in the logs.
await context.Application.AssertAppLogsWithIdleCheckAsync();
}
}

0 comments on commit 2f9899e

Please sign in to comment.