Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dotnet/test/E2E/SessionE2ETests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -388,13 +388,13 @@ public async Task Should_Receive_Session_Events()
// Use OnEvent to capture events dispatched during session creation.
// session.start is emitted during the session.create RPC; if the session
// weren't registered in the sessions map before the RPC, it would be dropped.
var earlyEvents = new List<SessionEvent>();
var earlyEvents = new ConcurrentQueue<SessionEvent>();
var sessionStartReceived = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
var session = await CreateSessionAsync(new SessionConfig
{
OnEvent = evt =>
{
earlyEvents.Add(evt);
earlyEvents.Enqueue(evt);
if (evt is SessionStartEvent)
sessionStartReceived.TrySetResult(true);
},
Expand Down
Loading