diff --git a/test/Common/DurableTaskEndToEndTests.cs b/test/Common/DurableTaskEndToEndTests.cs index 1044eddab..4613990bf 100644 --- a/test/Common/DurableTaskEndToEndTests.cs +++ b/test/Common/DurableTaskEndToEndTests.cs @@ -5577,16 +5577,26 @@ public async Task ExtendedSessions_OutOfProc_SetToFalse() { "FUNCTIONS_WORKER_RUNTIME", "node" }, }); - using (var host = TestHelpers.GetJobHostWithOptions( - this.loggerProvider, - durableTaskOptions, - nameResolver: nameResolver)) - { - await host.StartAsync(); - await host.StopAsync(); - } - Assert.False(durableTaskOptions.ExtendedSessionsEnabled); + InvalidOperationException exception = + await Assert.ThrowsAsync(async () => + { + using (var host = TestHelpers.GetJobHostWithOptions( + this.loggerProvider, + durableTaskOptions, + nameResolver: nameResolver)) + { + await host.StartAsync(); + await host.StopAsync(); + } + }); + + Assert.NotNull(exception); + Assert.StartsWith( + "Durable Functions with extendedSessionsEnabled set to 'true' is only supported when using", + exception.Message, + StringComparison.OrdinalIgnoreCase + ) } [Fact]