Commit 2d4a4d7
Fix flaky test: add synchronization point in ReadEventsAsync_InStreamingMode_YieldsNewlyWrittenEvents
The test was racy on .NET 10 because all 3 events could be written before
the readTask entered its polling loop. Add a TaskCompletionSource that the
readTask signals when it receives the first event, ensuring events 2 and 3
are written only after the streaming enumerator is confirmed to be active.
Agent-Logs-Url: https://github.com/modelcontextprotocol/csharp-sdk/sessions/f39d7d87-181b-4085-837a-7ec97f9c2b50
Co-authored-by: ericstj <8918108+ericstj@users.noreply.github.com>1 parent 65aaf94 commit 2d4a4d7
1 file changed
Lines changed: 12 additions & 1 deletion
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
904 | 904 | | |
905 | 905 | | |
906 | 906 | | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
907 | 912 | | |
908 | 913 | | |
909 | 914 | | |
910 | 915 | | |
| 916 | + | |
911 | 917 | | |
912 | 918 | | |
913 | 919 | | |
| |||
916 | 922 | | |
917 | 923 | | |
918 | 924 | | |
919 | | - | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
920 | 928 | | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
921 | 932 | | |
922 | 933 | | |
923 | 934 | | |
| |||
0 commit comments