New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Akka.TestKit: deleted IAsyncQueue
; replaced with System.Threading.Channel<T>
#7157
Merged
Aaronontheweb
merged 11 commits into
akkadotnet:dev
from
Aaronontheweb:fix-7145-testkit-AsyncQueue
Apr 12, 2024
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
630bda7
deleted `IAsyncQueue`; replaced with System.Threading.Channel
Aaronontheweb 69d5b92
added reproduction for #7145
Aaronontheweb 3cee51b
fixed issues with `ExpectNoMsgAsync` and `ExpectNoMsg`
Aaronontheweb 3fd7512
fixed issues with `TryPeekAsync`
Aaronontheweb 3ba0a17
Merge branch 'dev' into fix-7145-testkit-AsyncQueue
Aaronontheweb 53ff0aa
added API approvals
Aaronontheweb 1c48759
Merge branch 'fix-7145-testkit-AsyncQueue' of https://github.com/Aaro…
Aaronontheweb 0e2be2b
removed contention spec
Aaronontheweb 0a3b997
harden spec
Aaronontheweb 6553639
fix warning
Aaronontheweb 166600f
Merge branch 'dev' into fix-7145-testkit-AsyncQueue
Arkatufus File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -622,84 +622,6 @@ namespace Akka.TestKit.Extensions | |
} | ||
namespace Akka.TestKit.Internal | ||
{ | ||
public class AsyncQueue<T> : Akka.TestKit.Internal.ITestQueue<T> | ||
where T : class | ||
{ | ||
public AsyncQueue() { } | ||
public int Count { get; } | ||
public void Enqueue(T item) { } | ||
public System.Threading.Tasks.ValueTask EnqueueAsync(T item) { } | ||
public T Peek(System.Threading.CancellationToken cancellationToken) { } | ||
public System.Threading.Tasks.ValueTask<T> PeekAsync(System.Threading.CancellationToken cancellationToken) { } | ||
public T Take(System.Threading.CancellationToken cancellationToken) { } | ||
public System.Threading.Tasks.ValueTask<T> TakeAsync(System.Threading.CancellationToken cancellationToken) { } | ||
public System.Collections.Generic.List<T> ToList() { } | ||
public bool TryEnqueue(T item, int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) { } | ||
public System.Threading.Tasks.ValueTask<bool> TryEnqueueAsync(T item, int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) { } | ||
public bool TryPeek(out T item) { } | ||
public bool TryPeek(out T item, int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) { } | ||
[return: System.Runtime.CompilerServices.TupleElementNamesAttribute(new string[] { | ||
"success", | ||
"item"})] | ||
public System.Threading.Tasks.ValueTask<System.ValueTuple<bool, T>> TryPeekAsync(System.Threading.CancellationToken cancellationToken) { } | ||
[return: System.Runtime.CompilerServices.TupleElementNamesAttribute(new string[] { | ||
"success", | ||
"item"})] | ||
public System.Threading.Tasks.ValueTask<System.ValueTuple<bool, T>> TryPeekAsync(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) { } | ||
public bool TryTake(out T item, System.Threading.CancellationToken cancellationToken = null) { } | ||
public bool TryTake(out T item, int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) { } | ||
[return: System.Runtime.CompilerServices.TupleElementNamesAttribute(new string[] { | ||
"success", | ||
"item"})] | ||
public System.Threading.Tasks.ValueTask<System.ValueTuple<bool, T>> TryTakeAsync(System.Threading.CancellationToken cancellationToken) { } | ||
[return: System.Runtime.CompilerServices.TupleElementNamesAttribute(new string[] { | ||
"success", | ||
"item"})] | ||
public System.Threading.Tasks.ValueTask<System.ValueTuple<bool, T>> TryTakeAsync(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) { } | ||
} | ||
public class BlockingCollectionTestActorQueue<T> : Akka.TestKit.Internal.ITestActorQueueProducer<T>, Akka.TestKit.Internal.ITestActorQueue<T> | ||
{ | ||
public BlockingCollectionTestActorQueue(Akka.TestKit.Internal.ITestQueue<T> queue) { } | ||
public void Enqueue(T item) { } | ||
public System.Collections.Generic.IEnumerable<T> GetAll() { } | ||
public System.Collections.Generic.List<T> ToList() { } | ||
} | ||
public class BlockingQueue<T> : Akka.TestKit.Internal.ITestQueue<T> | ||
{ | ||
public BlockingQueue() { } | ||
public int Count { get; } | ||
[System.ObsoleteAttribute("This method will be removed from the public API in the future")] | ||
public void AddFirst(T item) { } | ||
public void Enqueue(T item) { } | ||
public System.Threading.Tasks.ValueTask EnqueueAsync(T item) { } | ||
public T Peek(System.Threading.CancellationToken cancellationToken) { } | ||
public System.Threading.Tasks.ValueTask<T> PeekAsync(System.Threading.CancellationToken cancellationToken) { } | ||
public T Take(System.Threading.CancellationToken cancellationToken) { } | ||
public System.Threading.Tasks.ValueTask<T> TakeAsync(System.Threading.CancellationToken cancellationToken) { } | ||
public System.Collections.Generic.List<T> ToList() { } | ||
public bool TryEnqueue(T item, int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) { } | ||
public System.Threading.Tasks.ValueTask<bool> TryEnqueueAsync(T item, int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) { } | ||
public bool TryPeek(out T item) { } | ||
public bool TryPeek(out T item, int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) { } | ||
[return: System.Runtime.CompilerServices.TupleElementNamesAttribute(new string[] { | ||
"success", | ||
"item"})] | ||
public System.Threading.Tasks.ValueTask<System.ValueTuple<bool, T>> TryPeekAsync(System.Threading.CancellationToken cancellationToken) { } | ||
[return: System.Runtime.CompilerServices.TupleElementNamesAttribute(new string[] { | ||
"success", | ||
"item"})] | ||
public System.Threading.Tasks.ValueTask<System.ValueTuple<bool, T>> TryPeekAsync(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) { } | ||
public bool TryTake(out T item, System.Threading.CancellationToken cancellationToken = null) { } | ||
public bool TryTake(out T item, int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) { } | ||
[return: System.Runtime.CompilerServices.TupleElementNamesAttribute(new string[] { | ||
"success", | ||
"item"})] | ||
public System.Threading.Tasks.ValueTask<System.ValueTuple<bool, T>> TryTakeAsync(System.Threading.CancellationToken cancellationToken) { } | ||
[return: System.Runtime.CompilerServices.TupleElementNamesAttribute(new string[] { | ||
"success", | ||
"item"})] | ||
public System.Threading.Tasks.ValueTask<System.ValueTuple<bool, T>> TryTakeAsync(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken) { } | ||
} | ||
public class CustomEventFilter : Akka.TestKit.Internal.EventFilterBase | ||
{ | ||
public CustomEventFilter(System.Predicate<Akka.Event.LogEvent> predicate) { } | ||
|
@@ -731,50 +653,6 @@ namespace Akka.TestKit.Internal | |
public override string ToString() { } | ||
} | ||
public delegate void EventMatched(Akka.TestKit.Internal.EventFilterBase eventFilter, Akka.Event.LogEvent logEvent); | ||
public interface ITestActorQueueProducer<in T> | ||
{ | ||
void Enqueue(T item); | ||
} | ||
public interface ITestActorQueue<T> : Akka.TestKit.Internal.ITestActorQueueProducer<T> | ||
{ | ||
System.Collections.Generic.IEnumerable<T> GetAll(); | ||
[System.ObsoleteAttribute("This method will be removed in the future")] | ||
System.Collections.Generic.List<T> ToList(); | ||
} | ||
public interface ITestQueue<T> | ||
{ | ||
int Count { get; } | ||
void Enqueue(T item); | ||
System.Threading.Tasks.ValueTask EnqueueAsync(T item); | ||
T Peek(System.Threading.CancellationToken cancellationToken); | ||
System.Threading.Tasks.ValueTask<T> PeekAsync(System.Threading.CancellationToken cancellationToken); | ||
T Take(System.Threading.CancellationToken cancellationToken); | ||
System.Threading.Tasks.ValueTask<T> TakeAsync(System.Threading.CancellationToken cancellationToken); | ||
[System.ObsoleteAttribute("This method will be removed in the future")] | ||
System.Collections.Generic.List<T> ToList(); | ||
bool TryEnqueue(T item, int millisecondsTimeout, System.Threading.CancellationToken cancellationToken); | ||
System.Threading.Tasks.ValueTask<bool> TryEnqueueAsync(T item, int millisecondsTimeout, System.Threading.CancellationToken cancellationToken); | ||
bool TryPeek(out T item); | ||
bool TryPeek(out T item, int millisecondsTimeout, System.Threading.CancellationToken cancellationToken); | ||
[return: System.Runtime.CompilerServices.TupleElementNamesAttribute(new string[] { | ||
"success", | ||
"item"})] | ||
System.Threading.Tasks.ValueTask<System.ValueTuple<bool, T>> TryPeekAsync(System.Threading.CancellationToken cancellationToken); | ||
[return: System.Runtime.CompilerServices.TupleElementNamesAttribute(new string[] { | ||
"success", | ||
"item"})] | ||
System.Threading.Tasks.ValueTask<System.ValueTuple<bool, T>> TryPeekAsync(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken); | ||
bool TryTake(out T item, System.Threading.CancellationToken cancellationToken = null); | ||
bool TryTake(out T item, int millisecondsTimeout, System.Threading.CancellationToken cancellationToken); | ||
[return: System.Runtime.CompilerServices.TupleElementNamesAttribute(new string[] { | ||
"success", | ||
"item"})] | ||
System.Threading.Tasks.ValueTask<System.ValueTuple<bool, T>> TryTakeAsync(System.Threading.CancellationToken cancellationToken); | ||
[return: System.Runtime.CompilerServices.TupleElementNamesAttribute(new string[] { | ||
"success", | ||
"item"})] | ||
System.Threading.Tasks.ValueTask<System.ValueTuple<bool, T>> TryTakeAsync(int millisecondsTimeout, System.Threading.CancellationToken cancellationToken); | ||
} | ||
public class InfoFilter : Akka.TestKit.Internal.EventFilterBase | ||
{ | ||
public InfoFilter(Akka.TestKit.Internal.StringMatcher.IStringMatcher messageMatcher = null, Akka.TestKit.Internal.StringMatcher.IStringMatcher sourceMatcher = null) { } | ||
|
@@ -831,11 +709,6 @@ namespace Akka.TestKit.Internal | |
public virtual void HandleEvent(Akka.TestKit.Internal.EventFilterBase eventFilter, Akka.Event.LogEvent logEvent) { } | ||
} | ||
} | ||
public class InternalTestActor : Akka.Actor.UntypedActor | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Made the |
||
{ | ||
public InternalTestActor(Akka.TestKit.Internal.ITestActorQueue<Akka.TestKit.MessageEnvelope> queue) { } | ||
protected override void OnReceive(object message) { } | ||
} | ||
public class InternalTestActorRef : Akka.Actor.LocalActorRef | ||
{ | ||
public object UnderlyingActor { get; } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deleted this type