Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 179cf08

Browse files
Paulo Janottistephentoub
authored andcommitted
Http protocol dribble tests taking two long (#26680)
The time of inner loop is dominated by the http protocol dribble tests. Returning the Task.Delay to Task.Yield reduces it from ~19 seconds to less than a second on a Windows 10 RS3 box.
1 parent dee052f commit 179cf08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/System.Net.Http/tests/FunctionalTests/HttpProtocolTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public override async Task WriteAsync(byte[] buffer, int offset, int count, Canc
167167
for (int i = 0; i < count; i++)
168168
{
169169
await _wrapped.WriteAsync(buffer, offset + i, 1);
170-
await Task.Delay(3); // introduce short delays, enough to send packets individually but not so long as to extend test duration significantly
170+
await Task.Yield(); // introduce short delays, enough to send packets individually but not so long as to extend test duration significantly
171171
}
172172
}
173173

0 commit comments

Comments
 (0)