Standard Output Messages:
[testcontainers.org 00:00:03.98] Reuse is an experimental feature. For more information, visit: https://dotnet.testcontainers.org/api/resource_reuse/
-> warning: The previous ScenarioContext was already disposed.
Failed EmailAddressesAreValidatedByTheForgottenPasswordScreen("it uses unquoted backslashes",null) [26 ms]
Error Message:
System.InvalidOperationException : Sequence contains more than one element
TearDown : System.NullReferenceException : Object reference not set to an instance of an object.
Stack Trace:
at System.Linq.ThrowHelper.ThrowMoreThanOneElementException()
at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source, Boolean& found)
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
at DotNet.Testcontainers.Containers.DockerContainer.UnsafeCreateAsync(CancellationToken ct) in /_/src/Testcontainers/Containers/DockerContainer.cs:line 441
at DotNet.Testcontainers.Containers.DockerContainer.StartAsync(CancellationToken ct) in /_/src/Testcontainers/Containers/DockerContainer.cs:line 306
at [MYCOMPANY].[MYAPP].UI.Tests.Hooks.ConfigurationHooks.SetConfiguration(IObjectContainer objectContainer) in /home/runner/actions-runner/_work/[MYAPP]/[MYAPP]/Tests/[MYCOMPANY].[MYAPP].UI.Tests/Hooks/ConfigurationHooks.cs:line 48
at Reqnroll.Bindings.AsyncMethodHelper.ConvertTaskOfT(Task task, Boolean getValue)
at Reqnroll.Bindings.BindingDelegateInvoker.InvokeDelegateAsync(Delegate bindingDelegate, Object[] invokeArgs, ExecutionContextHolder executionContext)
at Reqnroll.Bindings.BindingInvoker.InvokeBindingAsync(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, DurationHolder durationHolder)
at Reqnroll.Infrastructure.TestExecutionEngine.InvokeHookAsync(IAsyncBindingInvoker invoker, IHookBinding hookBinding, HookType hookType)
at Reqnroll.Infrastructure.TestExecutionEngine.FireEventsAsync(HookType hookType)
at Reqnroll.Infrastructure.TestExecutionEngine.FireEventsAsync(HookType hookType)
at Reqnroll.Infrastructure.TestExecutionEngine.OnFeatureStartAsync(FeatureInfo featureInfo)
at Reqnroll.TestRunner.OnFeatureStartAsync(FeatureInfo featureInfo)
at [MYCOMPANY].[MYAPP].UI.Tests.Features.PasswordAndEmailValidationFeature.TestInitializeAsync()
at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter`1.BlockUntilCompleted()
at NUnit.Framework.Internal.MessagePumpStrategy.NoMessagePumpStrategy.WaitForCompletion(AwaitAdapter awaiter)
at NUnit.Framework.Internal.AsyncToSyncAdapter.Await[TResult](TestExecutionContext context, Func`1 invoke)
at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(TestExecutionContext context, Func`1 invoke)
at NUnit.Framework.Internal.Commands.SetUpTearDownItem.RunSetUpOrTearDownMethod(TestExecutionContext context, IMethodInfo method)
at NUnit.Framework.Internal.Commands.SetUpTearDownItem.RunSetUp(TestExecutionContext context)
at NUnit.Framework.Internal.Commands.BeforeAndAfterTestCommand.c__DisplayClass1_0.b__0()
at NUnit.Framework.Internal.Commands.DelegatingTestCommand.RunTestMethodInThreadAbortSafeZone(TestExecutionContext context, Action action)
--TearDown
at Reqnroll.Infrastructure.TestExecutionEngine.OnScenarioEndAsync()
at Reqnroll.TestRunner.OnScenarioEndAsync()
at [MYCOMPANY].[MYAPP].UI.Tests.Features.PasswordAndEmailValidationFeature.TestTearDownAsync()
at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter`1.GetResult()
at NUnit.Framework.Internal.AsyncToSyncAdapter.Await[TResult](TestExecutionContext context, Func`1 invoke)
at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(TestExecutionContext context, Func`1 invoke)
at NUnit.Framework.Internal.Commands.SetUpTearDownItem.RunSetUpOrTearDownMethod(TestExecutionContext context, IMethodInfo method)
at NUnit.Framework.Internal.Commands.SetUpTearDownItem.RunTearDown(TestExecutionContext context)
Die obige Fehlermeldung erfolgt, wenn ich versuche, einen Testkontainer in meinem Automatisierungstestskript für das Ausführen eines MailDEV -Servers einrichten zu können, um E -Mails für einen Mail -Absender für Benutzer anzumelden,/Passwort für mein Unternehmen.
[BeforeFeature(Order = TestRunSequence.RegisterObjectContainer)]
public static async Task SetConfiguration(IObjectContainer objectContainer)
{
var configuration = new ConfigurationBuilder()
.SetBasePath(AppDomain.CurrentDomain.BaseDirectory)
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.AddEnvironmentVariables() // Load [url=viewtopic.php?t=25360]environment[/url] variables
.AddUserSecrets()
.Build();
objectContainer?.RegisterInstanceAs(configuration);
var mailDevContainer= new ContainerBuilder()
.WithImage("maildev/maildev:latest")
.WithPortBinding(1080, true)
.WithPortBinding(1025, true)
.WithWaitStrategy(Wait.ForUnixContainer().UntilPortIsAvailable(1080))
.WithReuse(true)
.WithLabel("maildev-container", "MailDev")
.WithPortBinding(1080, 1080)
.WithPortBinding(1025, 1025)
.Build();
if (!isStarted)
{
await mailDevContainer.StartAsync();
isStarted = true;
}
objectContainer?.RegisterInstanceAs(mailDevContainer);
***(More code irrelevant to this issue is here)***
}
< /code>
Es scheint, als würde es sich über Zeile 48 beschweren (Tests/[MYCOMPANY].[MYAPP].UI.Tests/Hooks/ConfigurationHooks.cs:line 48
); Was die Zeile widerspiegelt, wartet maildevContainer.startasync ();
Ich weiß nicht, warum dies auftritt, aber ich sehe auch einen Fehler vor dieser erwähnten Fehlermeldung: docer. Programmierung externer Konnektivität auf Endpoint Adoring_Hopper (397aEAF67AF9014DC4341DFEDC0494E52219CEB718D00FCE6160BD81E8C69A74): BINDE FÜR 0.0.0.0:1025 FAILIENT: PORT: Port ist bereits zugeteilt. Könnt ihr helfen, dies zu identifizieren?
[b] Fehlerprotokoll: [/b] [code]Standard Output Messages: [testcontainers.org 00:00:03.98] Reuse is an experimental feature. For more information, visit: https://dotnet.testcontainers.org/api/resource_reuse/ -> warning: The previous ScenarioContext was already disposed. Failed EmailAddressesAreValidatedByTheForgottenPasswordScreen("it uses unquoted backslashes",null) [26 ms] Error Message: System.InvalidOperationException : Sequence contains more than one element TearDown : System.NullReferenceException : Object reference not set to an instance of an object. Stack Trace: at System.Linq.ThrowHelper.ThrowMoreThanOneElementException() at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source, Boolean& found) at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source) at DotNet.Testcontainers.Containers.DockerContainer.UnsafeCreateAsync(CancellationToken ct) in /_/src/Testcontainers/Containers/DockerContainer.cs:line 441 at DotNet.Testcontainers.Containers.DockerContainer.StartAsync(CancellationToken ct) in /_/src/Testcontainers/Containers/DockerContainer.cs:line 306 at [MYCOMPANY].[MYAPP].UI.Tests.Hooks.ConfigurationHooks.SetConfiguration(IObjectContainer objectContainer) in /home/runner/actions-runner/_work/[MYAPP]/[MYAPP]/Tests/[MYCOMPANY].[MYAPP].UI.Tests/Hooks/ConfigurationHooks.cs:line 48 at Reqnroll.Bindings.AsyncMethodHelper.ConvertTaskOfT(Task task, Boolean getValue) at Reqnroll.Bindings.BindingDelegateInvoker.InvokeDelegateAsync(Delegate bindingDelegate, Object[] invokeArgs, ExecutionContextHolder executionContext) at Reqnroll.Bindings.BindingInvoker.InvokeBindingAsync(IBinding binding, IContextManager contextManager, Object[] arguments, ITestTracer testTracer, DurationHolder durationHolder) at Reqnroll.Infrastructure.TestExecutionEngine.InvokeHookAsync(IAsyncBindingInvoker invoker, IHookBinding hookBinding, HookType hookType) at Reqnroll.Infrastructure.TestExecutionEngine.FireEventsAsync(HookType hookType) at Reqnroll.Infrastructure.TestExecutionEngine.FireEventsAsync(HookType hookType) at Reqnroll.Infrastructure.TestExecutionEngine.OnFeatureStartAsync(FeatureInfo featureInfo) at Reqnroll.TestRunner.OnFeatureStartAsync(FeatureInfo featureInfo) at [MYCOMPANY].[MYAPP].UI.Tests.Features.PasswordAndEmailValidationFeature.TestInitializeAsync() at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter`1.BlockUntilCompleted() at NUnit.Framework.Internal.MessagePumpStrategy.NoMessagePumpStrategy.WaitForCompletion(AwaitAdapter awaiter) at NUnit.Framework.Internal.AsyncToSyncAdapter.Await[TResult](TestExecutionContext context, Func`1 invoke) at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(TestExecutionContext context, Func`1 invoke) at NUnit.Framework.Internal.Commands.SetUpTearDownItem.RunSetUpOrTearDownMethod(TestExecutionContext context, IMethodInfo method) at NUnit.Framework.Internal.Commands.SetUpTearDownItem.RunSetUp(TestExecutionContext context) at NUnit.Framework.Internal.Commands.BeforeAndAfterTestCommand.c__DisplayClass1_0.b__0() at NUnit.Framework.Internal.Commands.DelegatingTestCommand.RunTestMethodInThreadAbortSafeZone(TestExecutionContext context, Action action) --TearDown at Reqnroll.Infrastructure.TestExecutionEngine.OnScenarioEndAsync() at Reqnroll.TestRunner.OnScenarioEndAsync() at [MYCOMPANY].[MYAPP].UI.Tests.Features.PasswordAndEmailValidationFeature.TestTearDownAsync() at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter`1.GetResult() at NUnit.Framework.Internal.AsyncToSyncAdapter.Await[TResult](TestExecutionContext context, Func`1 invoke) at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(TestExecutionContext context, Func`1 invoke) at NUnit.Framework.Internal.Commands.SetUpTearDownItem.RunSetUpOrTearDownMethod(TestExecutionContext context, IMethodInfo method) at NUnit.Framework.Internal.Commands.SetUpTearDownItem.RunTearDown(TestExecutionContext context) [/code] Die obige Fehlermeldung erfolgt, wenn ich versuche, einen Testkontainer in meinem Automatisierungstestskript für das Ausführen eines MailDEV -Servers einrichten zu können, um E -Mails für einen Mail -Absender für Benutzer anzumelden,/Passwort für mein Unternehmen.[code][BeforeFeature(Order = TestRunSequence.RegisterObjectContainer)] public static async Task SetConfiguration(IObjectContainer objectContainer) { var configuration = new ConfigurationBuilder() .SetBasePath(AppDomain.CurrentDomain.BaseDirectory) .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true) .AddEnvironmentVariables() // Load [url=viewtopic.php?t=25360]environment[/url] variables .AddUserSecrets() .Build(); objectContainer?.RegisterInstanceAs(configuration);
var mailDevContainer= new ContainerBuilder() .WithImage("maildev/maildev:latest") .WithPortBinding(1080, true) .WithPortBinding(1025, true) .WithWaitStrategy(Wait.ForUnixContainer().UntilPortIsAvailable(1080)) .WithReuse(true) .WithLabel("maildev-container", "MailDev") .WithPortBinding(1080, 1080) .WithPortBinding(1025, 1025) .Build();
if (!isStarted) { await mailDevContainer.StartAsync(); isStarted = true; }
***(More code irrelevant to this issue is here)*** } < /code> Es scheint, als würde es sich über Zeile 48 beschweren (Tests/[MYCOMPANY].[MYAPP].UI.Tests/Hooks/ConfigurationHooks.cs:line 48[/code]); Was die Zeile widerspiegelt, wartet maildevContainer.startasync (); Ich weiß nicht, warum dies auftritt, aber ich sehe auch einen Fehler vor dieser erwähnten Fehlermeldung: docer. Programmierung externer Konnektivität auf Endpoint Adoring_Hopper (397aEAF67AF9014DC4341DFEDC0494E52219CEB718D00FCE6160BD81E8C69A74): BINDE FÜR 0.0.0.0:1025 FAILIENT: PORT: Port ist bereits zugeteilt. Könnt ihr helfen, dies zu identifizieren?
Ich versuche, ein T5-Base -Modell für die Erstellung geeigneter Frage gegen ein Compliance-Element zu optimieren. Compliance -Itresams sind Absatz von Texten und meine Frage befindet sich im...
Meine Tests fehlen, wenn Sie versuchen, mit dem zweiten Fenster zu interagieren, sei es eine Taste, ein Treeview oder eine Menuitem. Zuerst habe ich mit dem Baum interagiert und dachte, dass das...
Ich versuche, ein ASP.NET -Kern -Web -API -Projekt in meinem Linux -System (Ubuntu 22.04) zu erstellen und mit dem Befehl dotnet restore oder dotnet New ein Problem zu stellen: Der Prozess bleibt...
Ich sende also etwa 300 Datensätze alle 3 Sekunden und erhalte die Fehlermeldung:
System.InvalidOperation:Failed to create thread: Result too large(#)
at Confluent.Kafka.ProducerBuilder` 2.Build()...
Wenn ich meine Methode testen möchte, erhalte ich die Ausnahme: system.invalidoperationException: Die Quelle 'iQueryable' implementiert nicht 'iAsyncenumerable '. Nur Quellen, die 'iAsyncenumerable'...