Starts in:
0 DAY
12 HRS
6 MIN
57 SEC
Starts in:
0 D
12 H
6 M
57 S

Activities of "andreking"

Thanks for your help, the tests run now.

No, sorry I must have hit the wrong 'add answer button'

That is the exit code: -42. I can post the whole log here, but it will be messy - if you give me a place to send it, I can. here is more context including the exit code: TpTrace Verbose: 0 : 36120, 7, 2022/04/21, 08:24:25.331, 4876539827956, vstest.console.dll, TcpClientExtensions.MessageLoopAsync: NotifyDataAvailable remoteEndPoint: 127.0.0.1:55474 localEndPoint: 127.0.0.1:55473 TpTrace Verbose: 0 : 36120, 7, 2022/04/21, 08:24:25.331, 4876539829022, vstest.console.dll, TestRequestSender.OnExecutionMessageReceived: Received message: {"Version":5,"MessageType":"TestExecution.StatsChange","Payload":{"NewTestResults":[],"TestRunStatistics":{"ExecutedTests":0,"Stats":{}},"ActiveTests":[{"Id":"c5219fb8-f8c4-fcd9-ca4c-02f7b5f369c6","FullyQualifiedName":"Volo.Abp.LanguageManagement.LanguageAppService_Tests.GetAsync","DisplayName":"Volo.Abp.LanguageManagement.LanguageAppService_Tests.GetAsync","ExecutorUri":"executor://xunit/VsTestRunner2/netcoreapp","Source":"C:\\dev\\CAO\\CAT-OS-Project\\modules\\Volo.LanguageManagement\\test\\Volo.Abp.LanguageManagement.Application.Tests\\bin\\Debug\\net6.0\\Volo.Abp.LanguageManagement.Application.Tests.dll","CodeFilePath":null,"LineNumber":0,"Properties":[]}]}} TpTrace Verbose: 0 : 36120, 7, 2022/04/21, 08:24:25.337, 4876539891163, vstest.console.dll, TestRunRequest:SendTestRunStatsChange: Starting. TpTrace Verbose: 0 : 36120, 7, 2022/04/21, 08:24:25.337, 4876539891813, vstest.console.dll, InProgress is Volo.Abp.LanguageManagement.LanguageAppService_Tests.GetAsync TpTrace Information: 0 : 36120, 7, 2022/04/21, 08:24:25.337, 4876539892230, vstest.console.dll, TestRunRequest:SendTestRunStatsChange: Completed. TpTrace Verbose: 0 : 36120, 7, 2022/04/21, 08:24:25.337, 4876539892436, vstest.console.dll, TcpClientExtensions.MessageLoopAsync: Polling on remoteEndPoint: 127.0.0.1:55474 localEndPoint: 127.0.0.1:55473 TpTrace Verbose: 0 : 36120, 7, 2022/04/21, 08:24:26.053, 4876547052981, vstest.console.dll, TcpClientExtensions.MessageLoopAsync: NotifyDataAvailable remoteEndPoint: 127.0.0.1:55474 localEndPoint: 127.0.0.1:55473 TpTrace Warning: 0 : 36120, 13, 2022/04/21, 08:24:26.054, 4876547062078, vstest.console.dll, TestHostManagerCallbacks.ErrorReceivedCallback Test host standard error line: TpTrace Error: 0 : 36120, 7, 2022/04/21, 08:24:26.056, 4876547079447, vstest.console.dll, Socket: Message loop: failed to receive message due to socket error System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. ---> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host. at System.Net.Sockets.NetworkStream.Read(Span1 buffer) --- End of inner exception stack trace --- at System.Net.Sockets.NetworkStream.Read(Span1 buffer) at System.Net.Sockets.NetworkStream.ReadByte() at System.IO.BinaryReader.Read7BitEncodedInt() at System.IO.BinaryReader.ReadString() at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.LengthPrefixCommunicationChannel.NotifyDataAvailable() at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TcpClientExtensions.MessageLoopAsync(TcpClient client, ICommunicationChannel channel, Action1 errorHandler, CancellationToken cancellationToken), remoteEndPoint: 127.0.0.1:55474 localEndPoint: 127.0.0.1:55473 TpTrace Information: 0 : 36120, 7, 2022/04/21, 08:24:26.056, 4876547080622, vstest.console.dll, SocketServer.PrivateStop: Stopping server endPoint: 127.0.0.1:55473 error: System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. ---> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host. at System.Net.Sockets.NetworkStream.Read(Span1 buffer) --- End of inner exception stack trace --- at System.Net.Sockets.NetworkStream.Read(Span1 buffer) at System.Net.Sockets.NetworkStream.ReadByte() at System.IO.BinaryReader.Read7BitEncodedInt() at System.IO.BinaryReader.ReadString() at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.LengthPrefixCommunicationChannel.NotifyDataAvailable() at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TcpClientExtensions.MessageLoopAsync(TcpClient client, ICommunicationChannel channel, Action1 errorHandler, CancellationToken cancellationToken) TpTrace Verbose: 0 : 36120, 7, 2022/04/21, 08:24:26.056, 4876547084194, vstest.console.dll, LengthPrefixCommunicationChannel.Dispose: Dispose reader and writer. TpTrace Information: 0 : 36120, 7, 2022/04/21, 08:24:26.056, 4876547085122, vstest.console.dll, SocketServer.Stop: Raise disconnected event endPoint: 127.0.0.1:55473 error: System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. ---> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host. at System.Net.Sockets.NetworkStream.Read(Span1 buffer) --- End of inner exception stack trace --- at System.Net.Sockets.NetworkStream.Read(Span1 buffer) at System.Net.Sockets.NetworkStream.ReadByte() at System.IO.BinaryReader.Read7BitEncodedInt() at System.IO.BinaryReader.ReadString() at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.LengthPrefixCommunicationChannel.NotifyDataAvailable() at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TcpClientExtensions.MessageLoopAsync(TcpClient client, ICommunicationChannel channel, Action1 errorHandler, CancellationToken cancellationToken) TpTrace Verbose: 0 : 36120, 7, 2022/04/21, 08:24:26.056, 4876547085663, vstest.console.dll, TestRequestSender: OnTestRunAbort: Set operation complete. TpTrace Verbose: 0 : 36120, 7, 2022/04/21, 08:24:26.056, 4876547085832, vstest.console.dll, TestRequestSender.SetOperationComplete: Setting operation complete. TpTrace Information: 0 : 36120, 7, 2022/04/21, 08:24:26.056, 4876547085994, vstest.console.dll, SocketServer.Stop: Stop server endPoint: 127.0.0.1:55473 TpTrace Verbose: 0 : 36120, 7, 2022/04/21, 08:24:26.056, 4876547086445, vstest.console.dll, TestRequestSender: GetAbortErrorMessage: Exception: System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. ---> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host. at System.Net.Sockets.NetworkStream.Read(Span1 buffer) --- End of inner exception stack trace --- at System.Net.Sockets.NetworkStream.Read(Span1 buffer) at System.Net.Sockets.NetworkStream.ReadByte() at System.IO.BinaryReader.Read7BitEncodedInt() at System.IO.BinaryReader.ReadString() at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.LengthPrefixCommunicationChannel.NotifyDataAvailable() at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TcpClientExtensions.MessageLoopAsync(TcpClient client, ICommunicationChannel channel, Action1 errorHandler, CancellationToken cancellationToken) TpTrace Verbose: 0 : 36120, 7, 2022/04/21, 08:24:26.056, 4876547086674, vstest.console.dll, TestRequestSender: GetAbortErrorMessage: Client has disconnected. Wait for standard error. TpTrace Verbose: 0 : 36120, 8, 2022/04/21, 08:24:26.070, 4876547219227, vstest.console.dll, TestHostProvider.ExitCallBack: Host exited starting callback. TpTrace Error: 0 : 36120, 8, 2022/04/21, 08:24:26.070, 4876547222958, vstest.console.dll, TestHostManagerCallbacks.ExitCallBack: Testhost processId: 31832 exited with exitcode: -42 error: '' TpTrace Verbose: 0 : 36120, 8, 2022/04/21, 08:24:26.070, 4876547223376, vstest.console.dll, DotnetTestHostManager.OnHostExited: invoking OnHostExited callback TpTrace Verbose: 0 : 36120, 8, 2022/04/21, 08:24:26.070, 4876547223635, vstest.console.dll, CrossPlatEngine.TestHostManagerHostExited: calling on client process exit callback. TpTrace Information: 0 : 36120, 8, 2022/04/21, 08:24:26.070, 4876547223875, vstest.console.dll, TestRequestSender.OnClientProcessExit: Test host process exited. Standard error: TpTrace Information: 0 : 36120, 8, 2022/04/21, 08:24:26.070, 4876547224098, vstest.console.dll, SocketServer.Stop: Stop server endPoint: 127.0.0.1:55473 TpTrace Information: 0 : 36120, 7, 2022/04/21, 08:24:26.070, 4876547224462, vstest.console.dll, TestRequestSender: GetAbortErrorMessage: Received test host error message. TpTrace Error: 0 : 36120, 7, 2022/04/21, 08:24:26.070, 4876547226675, vstest.console.dll, TestRequestSender: Aborting test run because Test host process crashed

Here is the command line I ran limited it to 1 test to reduce the log size: dotnet test '.\modules\Volo.LanguageManagement\test\Volo.Abp.LanguageManagement.Application.Tests\Volo.Abp.LanguageManagement.Application.Tests.csproj' --diag:testcrashx.log --filter "FullyQualifiedName=Volo.Abp.LanguageManagement.LanguageAppService_Tests.GetAsync" --blame-crash Nothing very interesting, here is the exception: TpTrace Information: 0 : 15220, 8, 2022/04/21, 08:24:25.341, 4876539929101, datacollector.dll, DataCollectionTestCaseEventHandler: Test case 'Volo.Abp.LanguageManagement.LanguageAppService_Tests.GetAsync - c5219fb8-f8c4-fcd9-ca4c-02f7b5f369c6' started. TpTrace Error: 0 : 15220, 8, 2022/04/21, 08:24:26.061, 4876547134238, datacollector.dll, DataCollectionRequestHandler.HandleBeforeTestRunStart : Error occurred during initialization of TestHost : System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.. ---> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host. at System.Net.Sockets.NetworkStream.Read(Span1 buffer) --- End of inner exception stack trace --- at System.Net.Sockets.NetworkStream.Read(Span1 buffer) at System.Net.Sockets.NetworkStream.ReadByte() at System.IO.BinaryReader.Read7BitEncodedInt() at System.IO.BinaryReader.ReadString() at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.SocketCommunicationManager.ReceiveRawMessage() at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.SocketCommunicationManager.ReceiveMessage() at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.DataCollection.DataCollectionTestCaseEventHandler.ProcessRequests() at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.DataCollection.DataCollectionRequestHandler.<HandleBeforeTestRunStart>b__24_0() TpTrace Information: 0 : 15220, 1, 2022/04/21, 08:24:26.078, 4876547305013, datacollector.dll, DataCollectionRequestHandler.ProcessRequests : Datacoll

I can send the complete logs if you have a place to send them. andre

To reproduce, just need to run any test in the project that calls the code above, the problem happens when the line marked with the comment is run. All the tests call this code, so running any test will cause the problem. I am not sure how you can reproduce since you do not have our code and as I explained in the original, it does not crash in the code we started with (using abp cli). I will see if I am allowed to give you our source. What I was really looking for is suggestion of how to diagnose the problem with instantiating var dbo = context.ServiceProvider.GetService<DbContextOptions<LanguageManagementDbContext>>(); // test host crashes I assume it is a configuration we have changed but cannot find it. When I run the line above in the code produced by abp get-source LanguageManagement it goes into the configure method here:

public class LanguageManagementEntityFrameworkCoreTestModule : AbpModule
{
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        var sqliteConnection = CreateDatabaseAndGetConnection();

        Configure<AbpDbContextOptions>(options =>
        {
            options.Configure(abpDbContextConfigurationContext =>
            {
   **// this line gets called in original code
                 abpDbContextConfigurationContext.DbContextOptions.UseSqlite(sqliteConnection);**
            });
        });
    }

    private static SqliteConnection CreateDatabaseAndGetConnection()
    {
        var connection = new SqliteConnection("Data Source=:memory:");
        connection.Open();

        new LanguageManagementDbContext(
            new DbContextOptionsBuilder<LanguageManagementDbContext>().UseSqlite(connection).Options
        ).GetService<IRelationalDatabaseCreator>().CreateTables();

        new SettingManagementDbContext(
            new DbContextOptionsBuilder<SettingManagementDbContext>().UseSqlite(connection).Options
        ).GetService<IRelationalDatabaseCreator>().CreateTables();

        return connection;
    }
}

When I run the line above to fetch the options from the container (via any LM test), the test crashes before it runs the Configure method above. Note that our code for the class above is the same as this, we did not change it.

Hi,

Can you share a simple project? shiwei.liang@volosoft.com

Not easy to create a simple project since it is based on the Language Management source. Do you have any other ideas?

Showing 1 to 6 of 6 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06