Rank: Advanced Member
Groups: Registered
Joined: 8/30/2012(UTC) Posts: 38
Thanks: 7 times Was thanked: 5 time(s) in 5 post(s)
|
Remco;17727 wrote:My first thought here is whether this might be due to overlapping threads from other tests that have RDI enabled. Can you reproduce the issue at all by running the test in isolation? That test no longer has the attribute. I need to get work done :) But with the test that just started failing with the attribute applied, yes I can. It crashes every time when I run just that test alone from the test runner. But on the topic of threads, this test does run multiple threads internally. Here is the complete output from the test: Code:
NCrunch: This test was executed on server '(local)'
INFO:Composable.Testing.Databases.DatabasePool: 00:39:45.621 Reserved pool database: Composable_DatabasePool_0003
############################################# ERROR in : Composable.Testing.Databases.DatabasePool #############################################
MESSAGE:
EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object.
at nCrunch.TestRuntime.DotNetCore.RuntimeDataInspection.MemoryMappedLog.LogStateMachineCompletion(Object stateMachineInstance, Int32 componentMappingId, UInt32 outerScopeTransientId, UInt32 outerScopeFrameIndex, Int64 frameStartInLog)
at nCrunch.TestRuntime.DotNetCore.RuntimeDataInspection.RdiEventListener.NCrunchLogStateMachineCompletion(Object stateMachineInstance, Int32 componentMappingId, UInt32 outerScopeTransientId, UInt32 outerScopeFrameIndex, Int64 frameStartInLog)
at Composable.SystemCE.ThreadingCE.SyncOrAsyncCE.Run(SyncOrAsync syncOrAsync, Action synchronous, Func`1 asynchronous) in C:\Dev\Composable\src\framework\Composable.CQRS\SystemCE\ThreadingCE\SyncOrAsync.cs:line 39
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Composable.SystemCE.ThreadingCE.SyncOrAsyncCE.Run(SyncOrAsync syncOrAsync, Action synchronous, Func`1 asynchronous)
at Composable.Persistence.MsSql.IComposableMsSqlConnection.ComposableMsSqlConnection.Composable.Persistence.Common.AdoCE.IPoolableConnection.OpenAsyncFlex(SyncOrAsync syncOrAsync) in C:\Dev\Composable\src\framework\Composable.CQRS.ExternalDependencies\Persistence\MsSql\ComposableMsSqlConnection.cs:line 21
at Composable.Persistence.Common.AdoCE.DbConnectionManager`2.DefaultDbConnectionManager.OpenConnectionAsyncFlex(SyncOrAsync syncOrAsync) in C:\Dev\Composable\src\framework\Composable.CQRS.ExternalDependencies\Persistence\Common\AdoCE\DbConnectionPool.Pools.cs:line 53
at Composable.Persistence.Common.AdoCE.DbConnectionManager`2.DefaultDbConnectionManager.UseConnectionAsyncFlex[TResult](SyncOrAsync syncOrAsync, Func`2 func) in C:\Dev\Composable\src\framework\Composable.CQRS.ExternalDependencies\Persistence\Common\AdoCE\DbConnectionPool.Pools.cs:line 69
at Composable.SystemCE.ThreadingCE.SyncOrAsyncCE.SyncResult[TResult](Task`1 this) in C:\Dev\Composable\src\framework\Composable.CQRS\SystemCE\ThreadingCE\SyncOrAsync.cs:line 45
at Composable.Persistence.Common.AdoCE.IDbConnectionPool`2.UseConnection(Action`1 action) in C:\Dev\Composable\src\framework\Composable.CQRS.ExternalDependencies\Persistence\Common\AdoCE\IDbConnectionPool.cs:line 21
at Composable.Persistence.MsSql.Testing.Databases.MsSqlDatabasePool.ResetDatabase(Database db) in C:\Dev\Composable\src\framework\Composable.CQRS.ExternalDependencies\Persistence\MsSql\Testing\Databases\MsSqlDatabasePool.cs:line 52
at Composable.Testing.Databases.DatabasePool.<>c__DisplayClass12_1.<ConnectionStringFor>b__3() in C:\Dev\Composable\src\framework\Composable.CQRS\Testing\Databases\DatabasePool.cs:line 84
at Composable.SystemCE.TransactionsCE.TransactionScopeCe.Execute(Action action, TransactionScopeOption option, IsolationLevel isolationLevel) in C:\Dev\Composable\src\framework\Composable.CQRS\SystemCE\TransactionsCE\TransactionScopeCE.cs:line 28
at Composable.SystemCE.TransactionsCE.TransactionScopeCe.SuppressAmbient(Action action) in C:\Dev\Composable\src\framework\Composable.CQRS\SystemCE\TransactionsCE\TransactionScopeCE.cs:line 13
at Composable.Testing.Databases.DatabasePool.<>c__DisplayClass12_0.<ConnectionStringFor>b__0() in C:\Dev\Composable\src\framework\Composable.CQRS\Testing\Databases\DatabasePool.cs:line 84
############################################# SERIALIZED EXCEPTION #############################################
{
"$type": "System.NullReferenceException, System.Private.CoreLib",
"Message": "Object reference not set to an instance of an object.",
"Data": {
"$type": "System.Collections.ListDictionaryInternal, System.Private.CoreLib"
},
"InnerException": null,
"HelpLink": null,
"Source": "nCrunch.TestRuntime.DotNetCore",
"HResult": -2147467261
}
############################################# END ERROR #############################################
System.NullReferenceException : Object reference not set to an instance of an object.
at nCrunch.TestRuntime.DotNetCore.RuntimeDataInspection.MemoryMappedLog.LogStateMachineCompletion(Object stateMachineInstance, Int32 componentMappingId, UInt32 outerScopeTransientId, UInt32 outerScopeFrameIndex, Int64 frameStartInLog)
at nCrunch.TestRuntime.DotNetCore.RuntimeDataInspection.RdiEventListener.NCrunchLogStateMachineCompletion(Object stateMachineInstance, Int32 componentMappingId, UInt32 outerScopeTransientId, UInt32 outerScopeFrameIndex, Int64 frameStartInLog)
at Composable.SystemCE.ThreadingCE.SyncOrAsyncCE.Run(SyncOrAsync syncOrAsync, Action synchronous, Func`1 asynchronous) in C:\Dev\Composable\src\framework\Composable.CQRS\SystemCE\ThreadingCE\SyncOrAsync.cs:line 39
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Composable.SystemCE.ThreadingCE.SyncOrAsyncCE.Run(SyncOrAsync syncOrAsync, Action synchronous, Func`1 asynchronous)
at Composable.Persistence.MsSql.IComposableMsSqlConnection.ComposableMsSqlConnection.Composable.Persistence.Common.AdoCE.IPoolableConnection.OpenAsyncFlex(SyncOrAsync syncOrAsync) in C:\Dev\Composable\src\framework\Composable.CQRS.ExternalDependencies\Persistence\MsSql\ComposableMsSqlConnection.cs:line 21
at Composable.SystemCE.ThreadingCE.SyncOrAsyncCE.SyncResult(Task this) in C:\Dev\Composable\src\framework\Composable.CQRS\SystemCE\ThreadingCE\SyncOrAsync.cs:line 52
at Composable.SystemCE.ThreadingCE.SyncOrAsyncCE.<>c__DisplayClass1_0.<AsSync>b__0() in C:\Dev\Composable\src\framework\Composable.CQRS\SystemCE\ThreadingCE\SyncOrAsync.cs:line 20
at Composable.SystemCE.DiagnosticsCE.StopwatchCE.TimeExecution(Stopwatch this, Action action) in C:\Dev\Composable\src\framework\Composable.CQRS\SystemCE\DiagnosticsCE\StopwatchCE.cs:line 28
at Composable.SystemCE.DiagnosticsCE.StopwatchCE.TimeExecution(Action action) in C:\Dev\Composable\src\framework\Composable.CQRS\SystemCE\DiagnosticsCE\StopwatchCE.cs:line 20
at Composable.SystemCE.DiagnosticsCE.StopwatchCE.TimeExecutionFlexAsync(SyncOrAsync syncOrAsync, Func`2 syncOrAsyncAction) in C:\Dev\Composable\src\framework\Composable.CQRS\SystemCE\DiagnosticsCE\StopwatchCE.cs:line 63
at Composable.SystemCE.DiagnosticsCE.TimingsStatisticsCollector.TimeAsyncFlex(SyncOrAsync syncOrAsync, Func`2 syncOrAsyncFunc) in C:\Dev\Composable\src\framework\Composable.CQRS\SystemCE\DiagnosticsCE\TimingsStatisticsCollector.cs:line 81
at Composable.Persistence.Common.AdoCE.DbConnectionManager`2.DefaultDbConnectionManager.OpenConnectionAsyncFlex(SyncOrAsync syncOrAsync) in C:\Dev\Composable\src\framework\Composable.CQRS.ExternalDependencies\Persistence\Common\AdoCE\DbConnectionPool.Pools.cs:line 61
at Composable.Persistence.Common.AdoCE.DbConnectionManager`2.DefaultDbConnectionManager.UseConnectionAsyncFlex[TResult](SyncOrAsync syncOrAsync, Func`2 func) in C:\Dev\Composable\src\framework\Composable.CQRS.ExternalDependencies\Persistence\Common\AdoCE\DbConnectionPool.Pools.cs:line 69
at Composable.SystemCE.ThreadingCE.SyncOrAsyncCE.SyncResult[TResult](Task`1 this) in C:\Dev\Composable\src\framework\Composable.CQRS\SystemCE\ThreadingCE\SyncOrAsync.cs:line 45
at Composable.Persistence.Common.AdoCE.IDbConnectionPool`2.UseConnection[TResult](Func`2 func) in C:\Dev\Composable\src\framework\Composable.CQRS.ExternalDependencies\Persistence\Common\AdoCE\IDbConnectionPool.cs:line 18
at Composable.Persistence.Common.AdoCE.IDbConnectionPool`2.ExecuteScalar(String commandText) in C:\Dev\Composable\src\framework\Composable.CQRS.ExternalDependencies\Persistence\Common\AdoCE\IDbConnectionPool.cs:line 35
at Composable.Persistence.MsSql.Testing.Databases.MsSqlDatabasePool.EnsureDatabaseExistsAndIsEmpty(Database db) in C:\Dev\Composable\src\framework\Composable.CQRS.ExternalDependencies\Persistence\MsSql\Testing\Databases\MsSqlDatabasePool.cs:line 30
at Composable.Testing.Databases.DatabasePool.<>c__DisplayClass12_0.<ConnectionStringFor>b__0() in C:\Dev\Composable\src\framework\Composable.CQRS\Testing\Databases\DatabasePool.cs:line 89
at Composable.SystemCE.ThreadingCE.ResourceAccess.MonitorCE.Update[T](Func`1 func) in C:\Dev\Composable\src\framework\Composable.CQRS\SystemCE\ThreadingCE\ResourceAccess\MonitorCE.Functional..cs:line 22
at Composable.Testing.Databases.DatabasePool.ConnectionStringFor(String reservationName) in C:\Dev\Composable\src\framework\Composable.CQRS\Testing\Databases\DatabasePool.cs:line 47
at Composable.Persistence.MsSql.DependencyInjection.MsSqlPersistenceLayerRegistrar.<>c__DisplayClass1_1.<RegisterMsSqlPersistenceLayer>b__8() in C:\Dev\Composable\src\framework\Composable.CQRS.ExternalDependencies\Persistence\MsSql\DependencyInjection\MsSqlPersistenceLayerRegistrar.cs:line 33
at Composable.Persistence.MsSql.SystemExtensions.IMsSqlConnectionPool.MsSqlConnectionPool.<>c__DisplayClass3_0.<.ctor>b__0() in C:\Dev\Composable\src\framework\Composable.CQRS.ExternalDependencies\Persistence\MsSql\SystemExtensions\MsSqlConnectionPool.cs:line 25
at Composable.SystemCE.OptimizedLazy`1.<get_Value>b__4_0() in C:\Dev\Composable\src\framework\Composable.CQRS\SystemCE\OptimizedLazy.cs:line 18
at Composable.SystemCE.ThreadingCE.ResourceAccess.MonitorCE.Update[T](Func`1 func) in C:\Dev\Composable\src\framework\Composable.CQRS\SystemCE\ThreadingCE\ResourceAccess\MonitorCE.Functional..cs:line 22
at Composable.SystemCE.OptimizedLazy`1.get_Value() in C:\Dev\Composable\src\framework\Composable.CQRS\SystemCE\OptimizedLazy.cs:line 18
at Composable.Persistence.MsSql.SystemExtensions.IMsSqlConnectionPool.MsSqlConnectionPool.get_Pool() in C:\Dev\Composable\src\framework\Composable.CQRS.ExternalDependencies\Persistence\MsSql\SystemExtensions\MsSqlConnectionPool.cs:line 18
at Composable.Persistence.MsSql.SystemExtensions.IMsSqlConnectionPool.MsSqlConnectionPool.UseConnectionAsyncFlex[TResult](SyncOrAsync syncOrAsync, Func`2 func) in C:\Dev\Composable\src\framework\Composable.CQRS.ExternalDependencies\Persistence\MsSql\SystemExtensions\MsSqlConnectionPool.cs:line 33
at Composable.Persistence.Common.AdoCE.IDbConnectionPool`2.UseConnection[TResult](Func`2 func)
at Composable.Persistence.Common.AdoCE.IDbConnectionPool`2.UseCommand[TResult](Func`2 action)
at Composable.Persistence.MsSql.EventStore.MsSqlEventStoreConnectionManager.UseCommand[TResult](Boolean suppressTransactionWarning, Func`2 action) in C:\Dev\Composable\src\framework\Composable.CQRS.ExternalDependencies\Persistence\MsSql\EventStore\MsSqlEventStoreConnectionManager.cs:line 31
at Composable.Persistence.MsSql.EventStore.MsSqlEventStorePersistenceLayer.<SetupSchemaIfDatabaseUnInitialized>b__10_0() in C:\Dev\Composable\src\framework\Composable.CQRS.ExternalDependencies\Persistence\MsSql\EventStore\MsSqlEventStorePersistenceLayer.Schema.cs:line 17
at Composable.SystemCE.TransactionsCE.TransactionScopeCe.Execute(Action action, TransactionScopeOption option, IsolationLevel isolationLevel) in C:\Dev\Composable\src\framework\Composable.CQRS\SystemCE\TransactionsCE\TransactionScopeCE.cs:line 28
at Composable.SystemCE.TransactionsCE.TransactionScopeCe.SuppressAmbient(Action action) in C:\Dev\Composable\src\framework\Composable.CQRS\SystemCE\TransactionsCE\TransactionScopeCE.cs:line 13
at Composable.Persistence.MsSql.EventStore.MsSqlEventStorePersistenceLayer.SetupSchemaIfDatabaseUnInitialized() in C:\Dev\Composable\src\framework\Composable.CQRS.ExternalDependencies\Persistence\MsSql\EventStore\MsSqlEventStorePersistenceLayer.Schema.cs:line 13
at Composable.Persistence.EventStore.EventStore.SaveSingleAggregateEvents(IReadOnlyList`1 aggregateEvents) in C:\Dev\Composable\src\framework\Composable.CQRS\Persistence\EventStore\EventStore.cs:line 140
at Composable.Persistence.EventStore.EventStoreUpdater.<>c__DisplayClass16_0`1.<Save>b__0(IReadOnlyList`1 events) in C:\Dev\Composable\src\framework\Composable.CQRS\Persistence\EventStore\EventStoreUpdater.cs:line 98
at Composable.Persistence.EventStore.Aggregates.Aggregate`5.Commit(Action`1 commitEvents) in C:\Dev\Composable\src\framework\Composable.CQRS\Persistence\EventStore\Aggregates\Aggregate..cs:line 120
at Composable.Persistence.EventStore.EventStoreUpdater.Save[TAggregate](TAggregate aggregate) in C:\Dev\Composable\src\framework\Composable.CQRS\Persistence\EventStore\EventStoreUpdater.cs:line 87
at Composable.Tests.CQRS.EventStoreUpdaterTest.<>c__DisplayClass24_0.<Concurrent_read_only_access_to_aggregate_history_can_occur_in_parallel>b__0(IEventStoreUpdater session) in C:\Dev\Composable\src\framework\Composable.CQRS.Tests\CQRS\EventStoreUpdaterTest.cs:line 434
at Composable.Tests.CQRS.EventStoreUpdaterTest.<>c__DisplayClass5_0.<UseInTransactionalScope>b__0() in C:\Dev\Composable\src\framework\Composable.CQRS.Tests\CQRS\EventStoreUpdaterTest.cs:line 80
at Composable.SystemCE.TransactionsCE.TransactionScopeCe.Execute(Action action, TransactionScopeOption option, IsolationLevel isolationLevel) in C:\Dev\Composable\src\framework\Composable.CQRS\SystemCE\TransactionsCE\TransactionScopeCE.cs:line 28
at Composable.DependencyInjection.ServiceLocatorTransactionRunner.ExecuteTransactionInIsolatedScope(IServiceLocator me, Action action) in C:\Dev\Composable\src\framework\Composable.CQRS\DependencyInjection\TransactionalExtensions.cs:line 24
at Composable.Tests.CQRS.EventStoreUpdaterTest.UseInTransactionalScope(Action`1 useSession) in C:\Dev\Composable\src\framework\Composable.CQRS.Tests\CQRS\EventStoreUpdaterTest.cs:line 79
at Composable.Tests.CQRS.EventStoreUpdaterTest.Concurrent_read_only_access_to_aggregate_history_can_occur_in_parallel() in C:\Dev\Composable\src\framework\Composable.CQRS.Tests\CQRS\EventStoreUpdaterTest.cs:line 434
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
|