Issues with tests using Mac and Linux containers
See original GitHub issueUsing Rider, my project’s tests will run fine: all tests are green. But when I run the tests from the command line, using “dotnet test myProject.csproj”, then certain tests will get the exception listed below. I’m wondering if there is a known fix for this. Notably, I can often get the tests to pass if I shorten either the test class name, or the test function name. However, it is not limited to this because, often, tests with longer names will pass even though the shorter named tests fail.
(The project itself is “LiquidProjections.Couchbase”. More on that later perhaps.) The error is:
LiquidProjections.Couchbase.Tests.CouchbaseProjectorSpecs.When_event_requires_update_to_a_projector.Then_it_should_be_updated [FAIL] Failed LiquidProjections.Couchbase.Tests.CouchbaseProjectorSpecs.When_event_requires_update_to_a_projector.Then_it_should_be_updated [1 ms] Error Message: System.AggregateException : One or more errors occurred. (Projector failed to project an event.) ---- LiquidProjections.ProjectionException : Projector failed to project an event. -------- System.ArgumentException : The output byte buffer is too small to contain the encoded data, encoding ‘Unicode (UTF-8)’ fallback ‘System.Text.EncoderReplacementFallback’. (Parameter ‘bytes’) Stack Trace: at LiquidProjections.Testing.MemorySubscription.WaitUntilCheckpoint(Int64 checkpoint) at LiquidProjections.Testing.MemoryEventSource.WaitForAllSubscriptions() at LiquidProjections.Testing.MemoryEventSource.Write(Object[] events) at Chill.GivenSubject
1.<>c__DisplayClass6_0.<When>b__0() at Chill.Common.TaskExtensions.ExecuteInDefaultSynchronizationContext(Action action) at Chill.TestBase.TriggerTest(Action testAction, Boolean expectExceptions) at Chill.GivenSubject
1.TriggerTest(Boolean expectExceptions) at Chill.TestBase.EnsureTestTriggered(Boolean expectExceptions) at Chill.GivenSubject1.When(Action whenAction, Nullable
1 deferredExecution) at Chill.GivenSubject1.When(Func
1 whenActionAsync, Nullable1 deferredExecution) at LiquidProjections.Couchbase.Tests.CouchbaseProjectorSpecs.When_event_requires_update_to_a_projector..ctor(CouchbaseFixture databaseFixture, ITestOutputHelper helper) in /Users/mlearner/work/repos/RCM/LiquidProjections.Couchbase/src/LiquidProjections.Couchbase.Tests/CouchbaseProjectorSpecs.cs:line 530 ----- Inner Stack Trace ----- at LiquidProjections.Couchbase.CouchbaseProjector
1.ProjectTransactionStoreCheckpoint(Transaction transaction, IBucket bucket) in /Users/mlearner/work/repos/RCM/LiquidProjections.Couchbase/src/LiquidProjections.Couchbase/CouchbaseProjector.cs:line 155 at LiquidProjections.Couchbase.CouchbaseProjector1.<>c__DisplayClass11_0.<<Handle>b__0>d.MoveNext() in /Users/mlearner/work/repos/RCM/LiquidProjections.Couchbase/src/LiquidProjections.Couchbase/CouchbaseProjector.cs:line 112 --- End of stack trace from previous location where exception was thrown --- at LiquidProjections.Couchbase.CouchbaseProjector
1.ExecuteWithRetry(Func1 action) in /Users/mlearner/work/repos/RCM/LiquidProjections.Couchbase/src/LiquidProjections.Couchbase/CouchbaseProjector.cs:line 165 at LiquidProjections.Couchbase.CouchbaseProjector
1.ExecuteWithRetry(Func1 action) in /Users/mlearner/work/repos/RCM/LiquidProjections.Couchbase/src/LiquidProjections.Couchbase/CouchbaseProjector.cs:line 172 at LiquidProjections.Couchbase.CouchbaseProjector
1.Handle(IEnumerable1 transactions, SubscriptionInfo info) in /Users/mlearner/work/repos/RCM/LiquidProjections.Couchbase/src/LiquidProjections.Couchbase/CouchbaseProjector.cs:line 112 at LiquidProjections.Testing.MemorySubscription.RunAsync(SubscriptionInfo info) at LiquidProjections.Testing.MemorySubscription.<>c__DisplayClass12_0.<<Start>b__0>d.MoveNext() ----- Inner Stack Trace ----- at System.Text.Encoding.ThrowBytesOverflow() at System.Text.Encoding.ThrowBytesOverflow(EncoderNLS encoder, Boolean nothingEncoded) at System.Text.Encoding.GetBytesWithFallback(ReadOnlySpan
1 chars, Int32 originalCharsLength, Span1 bytes, Int32 originalBytesLength, EncoderNLS encoder) at System.Text.Encoding.GetBytesWithFallback(Char* pOriginalChars, Int32 originalCharCount, Byte* pOriginalBytes, Int32 originalByteCount, Int32 charsConsumedSoFar, Int32 bytesWrittenSoFar) at System.Text.UTF8Encoding.GetBytes(Char* chars, Int32 charCount, Byte* bytes, Int32 byteCount) at Couchbase.Core.IO.Converters.ByteConverter.FromString(String value, Span
1 buffer) at Couchbase.Core.IO.Operations.OperationBase.WriteKey(Span1 buffer) at Couchbase.Core.IO.Operations.OperationBase.WriteKey(OperationBuilder builder) at Couchbase.Core.IO.Operations.OperationBase.SendAsync(IConnection connection, CancellationToken cancellationToken) at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.<>c__DisplayClass29_0.<<BuildHandler>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Couchbase.Core.ClusterNode.ExecuteOp(Func
4 sender, IOperation op, Object state, CancellationToken token) at Couchbase.Core.ClusterNode.SendAsync(IOperation op, CancellationToken token) at Couchbase.CouchbaseBucket.SendAsync(IOperation op, CancellationToken token) at Couchbase.CouchbaseBucket.SendAsync(IOperation op, CancellationToken token) at Couchbase.Core.Retry.RetryOrchestrator.RetryAsync(BucketBase bucket, IOperation operation, CancellationToken token) at Couchbase.Core.BucketBase.RetryAsync(IOperation operation, CancellationToken token) at Couchbase.KeyValue.CouchbaseCollection.RetryUntilTimeoutOrSuccessAsync(Nullable1 token, Nullable
1 timeout, IOperation op) at Couchbase.KeyValue.CouchbaseCollection.ExecuteGet(String id, GetOptions options, IInternalSpan span) at Couchbase.KeyValue.CouchbaseCollection.GetAsync(String id, GetOptions options) at LiquidProjections.Couchbase.CouchbaseEventMapConfigurator1.OnUpdate(String key, CouchbaseProjectionContext context, Func
2 projector, Func1 createIfMissing) in /Users/mlearner/work/repos/RCM/LiquidProjections.Couchbase/src/LiquidProjections.Couchbase/CouchbaseEventMapConfigurator.cs:line 88 at LiquidProjections.EventMapBuilder
3.CrudAction1.UpdateAction.OnUpdate(Func
4 projector, TEvent anEvent, TContext context) at LiquidProjections.EventMapBuilder1.Action
1.<>c__DisplayClass5_1.<<As>b__1>d.MoveNext() — End of stack trace from previous location where exception was thrown — at LiquidProjections.EventMapBuilder1.Action
1.<>c__DisplayClass6_0.<<Add>b__0>d.MoveNext() — End of stack trace from previous location where exception was thrown — at LiquidProjections.EventMap1.Handle(Object anEvent, TContext context) at LiquidProjections.Couchbase.CouchbaseEventMapConfigurator
1.ProjectEvent(Object anEvent, CouchbaseProjectionContext context) in /Users/mlearner/work/repos/RCM/LiquidProjections.Couchbase/src/LiquidProjections.Couchbase/CouchbaseEventMapConfigurator.cs:line 33 at LiquidProjections.Couchbase.CouchbaseProjector`1.ProjectTransaction(Transaction transaction, IBucket bucket) in /Users/mlearner/work/repos/RCM/LiquidProjections.Couchbase/src/LiquidProjections.Couchbase/CouchbaseProjector.cs:line 215
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top GitHub Comments
I’m not dealing with this problem any more, though I don’t remember finding any resolution to it. And we’re using LP successfully!
Did you resolve this issue?